- feature: add primitive predicate (3114d7f)
- fix: perf tweaks for tight loops (8a9919d)
- chore: update ci config (136f185)
- feature: return the target value from assertions (73da792)
- chore: add release script dependency (cacc348)
- fix: make assert throw for any falsy value (4f15c73)
- Implement
nonEmptyObject
. Thanks to Victor Bakke. - Implement
nonEmptyArray
. Thanks to Victor Bakke. - Fix error messages on assertions that take a string as their last argument.
- Add support for custom error types in assertions.
- Throw TypeErrors by default.
- Breaking changes:
- Rename
instance
toinstanceStrict
. - Combine
builtIn
anduserDefined
to form newinstance
predicate.
- Rename
- Exclude non-src files from npm package
- Breaking change:
either
modifier removed.
- Eliminated some string duplication.
- Fix broken implementation of
maybe.array.of
.
- Breaking changes:
isMap
predicate removed (seebuiltIn
).error
predicate removed (seebuiltIn
).
- Implement
builtIn
predicate. - Implement
userDefined
predicate. - Implement
emptyString
predicate. - Implement
infinity
predicate.
- Implement
isMap
. Thanks to Ryan Temple.
- Implement
includes
.
- Implement
equal
.
- Breaking changes:
- Rename
unemptyString
=>nonEmptyString
. - Support derived error objects in
error
.
- Rename
- Fix HTMLElement instance predicate bug in Safari.
- Implement
greaterOrEqual
. - Implement
lessOrEqual
. - Implement
inRange
. - Fix default error message for
function
. Thanks to Paul Jolly.
- Implement
arrayLike
- Implement
iterable
- Implement
array.of
- Implement
arrayLike.of
- Implement
iterable.of
- Implement
object.of
- Fix unhandled exception when dereferencing undefined data inside
map
.
- Accept a single predicate in
map
. - Remove assertions from
hasLength
andlike
.
- Breaking changes:
- Rename
length
=>hasLength
. - Drop
webUrl
. (sorry @bahmutov!)
- Rename
- Turn
assert
,not
andmaybe
into standalone functions as well as modifiers. - Implement
match
for general regex-matching. Possibly of interest to former users ofwebUrl
,gitUrl
andemail
. - Implement
contains
. - Implement
between
. - Implement
greater
. - Implement
less
. - Implement
zero
. - Implement
emptyArray
. - Implement
error
. - Fix errant check that property counts match in
map
.
- Ensure
date
predicate returnsfalse
for invalid dates.
- Add
either
.
- Breaking changes:
- Drop ES3 support.
- Rename
verify
=>assert
. - Remame
nulled
=>null
. - Switch
defined
toundefined
for consistency withnull
. - Tightened implementation of
webUrl
to reject more cases. - Drop
gitUrl
. (sorry @galniv!) - Drop
email
. (sorry @rodrigo!) - Drop
floatNumber
. (sorry @rodrigo!) - Rename
oddNumber
,evenNumber
,positiveNumber
,negativeNumber
,intNumber
=>odd
,even
,positive
,negative
,integer
. - Rename
bool
=>boolean
. - Rename
every
=>all
.
- Add predicate
assigned
. - Add
apply
batch operation. - Delete superfluous unit tests.
- Implement
bool
predicate. Thanks to Clinton Skakun.
- Implement
email
,intNumber
andfloatNumber
predicates. Thanks to Rodrigo González. - Infinity is not a number.
- Implement
defined
andnulled
. Thanks to Alejandro Villanueva. - Speculatively fix conflict with angular-mocks.
- Implement
not
modifier. - Implement
gitUrl
predicate. Thanks to Gal Niv.
- Replace
check.maybe.verify.xxx
withcheck.verify.maybe.xxx
.
- API overhaul:
- Predicates exported as
check.xxx
rather thancheck.isXxx
. - Verifiers exported as
check.verify.xxx
rather thancheck.verifyXxx
. Thanks to Marc-Olivier Ricard.
- Predicates exported as
- Unit tests added for error messages.
- Added
isWebUrl
andverifyWebUrl
. Thanks to Gleb Bahmutov.
- Added
check.maybe
modifier. Thanks to Marc-Olivier Ricard. - Added
check.map
,check.every
andcheck.any
batch operations. Thanks to Marc-Olivier Ricard. - Harmonised the node and browser unit tests.