check-types
Advanced tools
Changelog
7.2.0
nonEmptyObject
. Thanks to [Victor Bakke][gipphe].nonEmptyArray
. Thanks to [Victor Bakke][gipphe].instance
to instanceStrict
.builtIn
and userDefined
to form new instance
predicate.either
modifier removed.maybe.array.of
.isMap
predicate removed (see builtIn
).error
predicate removed (see builtIn
).builtIn
predicate.userDefined
predicate.emptyString
predicate.infinity
predicate.isMap
. Thanks to [Ryan Temple][ryantemple].includes
.equal
.unemptyString
=> nonEmptyString
.error
.greaterOrEqual
.lessOrEqual
.inRange
.function
. Thanks to [Paul Jolly][myitcv].arrayLike
iterable
array.of
arrayLike.of
iterable.of
object.of
map
.map
.hasLength
and like
.length
=> hasLength
.webUrl
. (sorry @bahmutov!)assert
, not
and maybe
into standalone functions as well as modifiers.match
for general regex-matching. Possibly of interest to former users of webUrl
, gitUrl
and email
.contains
.between
.greater
.less
.zero
.emptyArray
.error
.map
.date
predicate returns false
for invalid dates.either
.verify
=> assert
.nulled
=> null
.defined
to undefined
for consistency with null
.webUrl
to reject more cases.gitUrl
. (sorry @galniv!)email
. (sorry @rodrigo!)floatNumber
. (sorry @rodrigo!)oddNumber
, evenNumber
, positiveNumber
, negativeNumber
, intNumber
=> odd
, even
, positive
, negative
, integer
.bool
=> boolean
.every
=> all
.assigned
.apply
batch operation.bool
predicate. Thanks to [Clinton Skakun][clintonskakun].email
, intNumber
and floatNumber
predicates. Thanks to [Rodrigo González][rodrigo].defined
and nulled
. Thanks to [Alejandro Villanueva][ialex].not
modifier.gitUrl
predicate. Thanks to [Gal Niv][galniv].check.maybe.verify.xxx
with check.verify.maybe.xxx
.check.xxx
rather than check.isXxx
.check.verify.xxx
rather than check.verifyXxx
. Thanks to [Marc-Olivier Ricard][marcolivier].isWebUrl
and verifyWebUrl
. Thanks to [Gleb Bahmutov][gleb].check.maybe
modifier. Thanks to [Marc-Olivier Ricard][marcolivier].check.map
, check.every
and check.any
batch operations. Thanks to [Marc-Olivier Ricard][marcolivier].