argent
v0.1.0
Published
Declarative handling of optional parameters
Downloads
3
Readme
argent
Declarative handling of optional parameters
Usage
var argent = require('argent');
var myWrappedFunction = argent(function(arg1, arg2, arg3) {
// function body goes here.
}, [
argent.string.regex(/[\d-]*/).def('default value'),
argent.and(argent.object, argent.all(['prop1', 'prop2']), argent.one(['prop3, prop4])),
argent.function
]);