0.0.5 • Published 12 years ago

qualify v0.0.5

Weekly downloads
1
License
-
Repository
github
Last release
12 years ago

qualify

JavaScript library to help building functions and methods with qualification checks for specific conditions.

License

License is MIT.

Installation

npm install qualify

Examples

Usage with Node.js:

var conform = require('qualify').conform;

Declare your functions like:

var foo = conform({
	defaults: 'right',
	max: 2, 
	validate: [{type:'string'}]
}, function(path, fn) {
	fn("Path was " + path);
});

Settings are:

  • defaults setting declares that optional arguments are fulfilled from right to left
  • max and min settings declare how many arguments the function can have
  • validate setting uses JSON schema format to specify how arguments are accepted. undefined validations are ignored.
0.0.5

12 years ago

0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago