rest
Rest​
is.array(target: unknown)​
- Target argument: required.
- Checks if the given "target" type is array.
// And all other known types will return false
// Reversal boolean result
// And all other known types will return true
is.compare(target: [object Object], source: [object Object])​
- Target and source arguments: required.
- Checks if the given "target" and "source" is compare.
// And all other known types will return false
// Reversal boolean result
// And all other known types will return true
is.empty(target: Map | Array | String | Object | Set)​
- Target argument: required.
- Checks if the given "target" type is empty.
// And all other known types will return false
// Reversal boolean result
// And all other known types will return true
is.function(target: Function | AsyncFunction | GeneratorFunction)​
- Target argument: required.
- Checks if the given "target" type is function.
// And all other known types will return false
// Reversal boolean result
// And all other known types will return true
is.instanceOf(target: unknown, classRef: Function)​
- Target and classRef arguments: required.
- Checks if the given "target" type instance of classRef.
// And all other known types will return false
// Reversal boolean result
// And all other known types will return true
is.len(target: String | Array, ...rest)​
- Target argument: required.
- Checks if the given "target" is true by rest, rest is "configList" you can configure manually or automatically through the method name as shown in the example.
// And all other known types will return false
// Reversal boolean result
// And all other known types will return true
is.null(target: unknown)​
- Target argument: required.
- Checks if the given "target" type is null.
// And all other known types will return false
// Reversal boolean result
// And all other known types will return true
is.object(target: Object)​
- Target argument: required.
- Checks if the given "target" type is object.
// And all other known types will return false
// Reversal boolean result
// And all other known types will return true
is.primitive(target: unknown)​
- Target argument: required.
- Checks if the given "target" type is primitive.
// And all other known types will return false
// Reversal boolean result
// And all other known types will return true
is.promise(target: unknown)​
- Target argument: required.
- Checks if the given "target" type is promise.
// And all other known types will return false
// Reversal boolean result
// And all other known types will return true
is.symbol(target: unknown)​
- Target argument: required.
- Checks if the given "target" type is symbol.
// And all other known types will return false
// Reversal boolean result
// And all other known types will return true
is.undefined(target: unknown)​
- Target argument: required.
- Checks if the given "target" type is undefined.
// And all other known types will return false
// Reversal boolean result
// And all other known types will return true