package
Functional assert library
npm install funsertGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Functional assert library
$ npm install --save funsertvar is = require('funsert');
var aboveFive = is.greaterThan(5);
var belowTen = is.ok(function (x) { return x < 10; }, 'below 10');
var inBounds = is(aboveFive, belowTen);
inBounds(7);
inBounds(3);
//=> Throws '3 is not greater than 5'This is still under heavy development. Happy to hear suggestions before 1.0.0 release!
Compose assertions with and operation.
Runs check function and throws Error, if it returns false.
Funsert wraps some predicate functions from predicates:
MIT © Vsevolod Strukchinsky
Estimated unpacked size across 3 packages.
91.1 kB
Includes dependencies.