Args.js lets you easily create functions with optional parameters, default parameters, parameter groups and named parameters. It checks types and will trigger exceptions if a function is called incorrectly. More of this var args = Args([ {elements: Args.ARRAY | Args.Required}, {qualifier: Args.FUNCTION | Args.Optional}, {node: Args.DOM_EL | Args.Optional} {regex: Args.STRING | Args.Optional}, {ind