Package Exports
- @basekits/kit-type
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@basekits/kit-type) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@basekits/kit-type
Essential type checking kit for basekits.
Install
npm i @basekits/kit-typeUsage
const kit = require('@basekits/core')
const type = require('@basekits/kit-type')
kit.addKit(type)Available Items
The following methods will be available after adding this kit:
.isString(value)
Checks if the value is a string. Returns boolean.
.isObject(value)
Checks if the value is an object. Returns boolean.
.isArray(value)
Checks if the value is an array. Returns boolean.
.isPromise(value)
Checks if the value is a promise. Returns boolean.
.isError(value)
Checks if the value is a javascript native error object. Returns boolean.
.isDate(value)
Checks if the value is a javascript native date object. Returns boolean.
.isFunction(value)
Checks if the value is a function. Returns boolean.
.isNull(value)
Checks if the value is null. Returns boolean.
.isUndefined(value)
Checks if the value is an undefined. Returns boolean.
.isNumber(value)
Checks if the value is a positive/negative finite number. Returns boolean.
.isInteger(value)
Checks if the value is an integer. Returns boolean.
.isNan(value)
Checks if the value is NaN. Returns boolean.
.isRegExp(value)
Checks if the value is a regular expression. Returns boolean.
.isBoolean(value)
Checks if the value is a boolean. Returns boolean.
.isBigInt(value)
Checks if the value is a BigInt. Returns boolean.
.isSymbol(value)
Checks if the value is a symbol. Returns boolean.
.isDOMElement(value)
Checks if the value is a DOM element. Returns boolean.
.getType(input)
Finds the type of the input. Returns object, array, promise, error, date, null, undefined, function, number, nan, regexp, string, boolean, bigint, symbol, domelement or none.