OVERVIEW
ensurejs is an assertion utility package for nodejs.
CODE EXAMPLE
const ensure = ; { ; ; ...}
INSTALLATION
npm install ensurejs
API Reference
// Throws if "x" is not truthy ; // Throws if "x" is truthy ; // Throws if "x" is not null or undefined ; // Throws if "x" is null or undefined ; // Throws if "x" and "y" are not equal ; // Throws if "x" and "y" are equal ; // Throws if "x" is less than or equal to "y" ; // Throws if "x" is less than "y" ; // Throws if "x" is greater than or equal to "y" ; // Throws if "x" is greater than "y" ; // Throws if "x" is not of type "y" ; // Throws if "x" does not contain "y" ;
TESTS
Run the unit tests using the below command.
npm test
LICENSE
ISC License