Permalink
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (16 sloc) 342 Bytes

assert

C-style assertion lib.

Example

With custom assertion message:

var assert = require('assert');
assert(expr, 'oh no it broke');

Or auto-generated assertion message in browsers that support Error.captureStackTrace():

var assert = require('assert');
assert(user.name == 'Tobi');

License

MIT