If you are like me and you write a lot of precondition checks in your functions 
to validate the arguments,
then I think you will like this module, here's a sample of what it can do:

var have = require('have');

function safeFunc(id, options, callback) {
  have(arguments,
    { id       : 'string or number'
    , options  : 'optional object'
    , callback : 'function'
    });
}


Basically a very short and concise DSL for validating arguments.

Install with `npm install have --save`

Head over to https://github.com/chakrit/have to check the README if you are 
interested. : )


- chakrit
http://chakrit.net

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to