Value of any type to check.
Returns true if suspect is a string, that may be returned by application
of typeof
operator (e.g. 'number', 'undefined', 'function')
Value af any type to check.
Returns true if suspect
is a string of BSON object id format.
Value of unknown type to validate.
Returns a TypePredicate
that checks whether given string enum values include
its suspect.
Returns true
if suspect
is integer, i.e. doesn't have decimal part.
Returns a predicate that checks its suspect to be an integer, such that
suspect >= target
Number to check inequality to.
Returns a predicate that checks its suspect to be an integer, such that
suspect > target
Number to check inequality to.
Returns a predicate that checks its suspect to be an integer, such that
suspect <= target
.
Number to check inequality to.
Returns a predicate that checks its suspect to be an integer, such that
suspect < target
Number to check inequality to.
Returns a predicate that checks its suspect to be an integer, such that
suspect !== target
.
Number to check inequality to.
Returns a predicate which checks its suspect to be an integer within the range [min, max].
Minimum value suspect can be.
Maximum value suspect can be.
Checks that suspect is a string and it conforms to ISO 8601 format.
Value of unknown type to check.
True if suspect is a string containing a date in ISO 8601 format. Internally uses 'is-iso-date' npm package.
Returns true
if suspect
is integer, and suspect < 0
Returns true
if suspect
is number, and suspect < 0
Shorthand for tdSet([isNull, isUndefined, typeDescr])
Returns true
if suspect === null
Shorthand for tdSet([isNull, typeDescr])
Returns a predicate that checks its suspect to be a number, such that
suspect >= target
Number to check inequality to.
Returns a predicate that checks its suspect to be a number, such that
suspect > target
Number to check inequality to.
Returns a predicate that checks its suspect to be a number, such that
suspect <= target
.
Number to check inequality to.
Returns a predicate that checks its suspect to be a number, such that
suspect < target
Number to check inequality to.
Returns a predicate that checks its suspect to be a number, such that
suspect !== target
.
Number to check inequality to.
Returns a predicate which checks its suspect to be a number within the range [min, max].
Minimum value suspect can be.
Maximum value suspect can be.
Returns a predicate that accepts a suspect of any type and matches it to one of the provided possible values by
possibleValues.includes(suspect)
Array with values of any type, suspect is matched to.
Returns true
if suspect
is integer, and suspect > 0
Returns true
if suspect
is number, and suspect > 0
Returns true
if suspect === undefined
Returns true
if suspect
is number and suspect === 0
Returns true
if suspect
is integer, and suspect <= 0
Returns true
if suspect
is number, and suspect <= 0
Returns true
if suspect
is integer, and suspect >= 0
Returns true
if suspect
is number, and suspect >= 0
Retuns tdSet(['undefined', typeDescr]))
TypeDescription
that will be united with 'undefined'
TD.
A noop function, that leverages literal strings of BasicTypeName
shape to be
of string literal types.
Type description to return.
A shorthand for new Set([...typeDescrs])
. It also makes TypeScript to
preserve BasicTypeName
string literal types.
TypeDescription
s that define a union of types that suspect may have.
Generated using TypeDoc
Returns true if suspect is truthy and typeof suspect === 'object' or 'function'.