@bemoje/assert-args
Assert that the passed arguments are defined.
Version
Travis CI
Dependencies
Stats
Donate
Installation
npm install @bemoje/assert-argsnpm install --save @bemoje/assert-argsnpm install --save-dev @bemoje/assert-args
Usage
/** * Adds a and b and throws Error if any parameters are missing */ { return a + b} /** * Calls the callback and returns true if the callback throws an error and false otherwise. */ { try return false catch e return true } //=> false //=> true
Tests
Uses Jest to test module functionality. Run tests to get coverage details.
npm run test
API
Table of Contents
assertArgs
Assert that the passed arguments are defined.
Parameters
-
args
...any arguments array -
Throws Error If any passed argument is undefined.
Returns void