v5.0.0
Last updated
Was this helpful?
Last updated
Was this helpful?
Added Undefined
generic type.
Added guard function guardStringLengthBetween()
.
Added check function isStringLengthBetween()
.
Added generic type GenericObject
.
Added guardStringIncludes()
and guardStringIncludesSome()
functions with tests.
Added guardObjectKeysIn()
function to guard the value to be an object
with specified keys in it(or its prototype chain).
Added are
prefixed functions to check the values of a rest parameter. areBigInt()
areBoolean()
areDate()
areDefined()
areFalse()
areNull()
areNumber()
areRegExp()
areSymbol()
areTrue()
areUndefined()
.
Added a generic type MinMax
that takes generic type variable Min
and Max
that represents the range between minimum and maximum.
Added new guard functions guardDate()
, guardFalse()
, guardNumberBetween()
, guardObjectKeyIn()
, guardObjectSomeKeys()
, guardRegExp()
, guardStringLength()
, guardTrue()
.
Added isObjectKeysIn()
, isObjectSomeKeys()
, isStringIncludes()
and isStringIncludesSome()
and to the is
object and to the Is
interface.
Added CallbackPayload
and ForEachCallback
types.
Added the type
object consists of are
, is
and guard
objects.
Added an object to handle executing the tests.
Added recognizeValue()
to recognize type of any value.
Updated the way of checking values in some of the is
and guard
prefixed functions.
Updated isPrimitive()
and isType()
function does not use switch on the type
argument.
Updated guard
, is
, isNot
prefixed functions to use updated generic type ResultCallback
with payload
parameter of generic type variable Payload
.
Updated isStringLength()
function to check the specific length
.
Updated guardStringLength()
function to check the specific length
.
Updated is {}
object by adding stringLengthBetween
method.
Updated guardIs
object by adding objectKeysIn
, stringIncludes
, stringLengthBetween
and stringIncludesSome
methods.
Updated GuardIs
interface by adding stringLengthBetween
.
Updated areString()
function that works by using the returned methods.
Freeze the guard
, guardIs
, isNot
and is
object.
Updated isObject()
function by adding the ability to check any kind of object, not only the Object
.
Updated NumberBetween
interface by adding MinMax
interface and a generic type variable Type
.
Updated StringOfLength
interface by adding MinMax
interface and a generic type variable Type
.
Updated isInstance()
function can now check any kind of instance.
Updated Is
interface by adding stringLengthBetween
.
Updated Is
interface and isNot
by changing the function types to the typeof
operator.
Updated the type of callback function ResultCallback
to provide the type of value and the shape of payload
.
Updated functions by adding a generic type variable Payload
constrained by the object
type that is by default equal to the object
.
Updated functions by adding a payload
parameter of generic type
that takes generic type variable CallbackPayloadPayload
to assign to callback function payload
parameter.
Updated functions by removing typeOf()
function if it's not necessary to use it.
Updated the Defined
to not use of Never
type cause of some compile issues.
Updated the guard
object by removing is
property.
Updated the isParam()
function by removing the Func
generic type in favor of Function
.
Updated isObjectKey()
, isObjectKeyIn
to check only one key instead of multiple keys.
Updated isObjectKeys()
works differently, now it searches for every key. The previous functionality provides isObjectSomeKeys()
.
Removed guard
prefixed function types.
Removed Func
type in favor of build-in Function
type.
Removed Key
type in favor of build-in PropertyKey
type.
Removed CycleHook
type.