funsert
Functional assert library
Install
$ npm install --save funsert
Usage
var is = ; var aboveFive = is;var belowTen = is;var inBounds = ; ;;//=> Throws '3 is not greater than 5'
API
This is still under heavy development. Happy to hear suggestions before 1.0.0
release!
funsert(assertions...)
Compose assertions with and
operation.
funsert.ok(check, [message])
Runs check
function and throws Error, if it returns false
.
Helpers
Funsert wraps some predicate functions from predicates:
- array
- equal
- lessThan
- greaterThan
- instanceOf
- hasOwnProperty
- hasProperty
- in
- matches
- strictEqual
- endsWith
- startsWith
License
MIT © Vsevolod Strukchinsky