assert()
JavaScript CSS Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
History.md
Makefile
Readme.md
component.json
example.html
example.js
index.js
package.json

Readme.md

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