insist
v1.0.1
Published
Drop-in replacement of assert with a better message.
Downloads
2,821
Readme
insist
A drop-in replacement for assert
, with a better default message.
var assert = require('insist');
// AssertionError: assert(3 instanceof Function);
assert(3 instanceof Function);
//plus all properties of assert
assert.equal(foo, bar); // AssertionError: "baz" == "quux" from assert.equal(foo, bar);
assert.ok();
assert.deepEqual();
// etc...
Also, turn off these assertions with NO_ASSERT=1
env var.