Nuns Practicing Misanthropy

    @basekits/kit-type

    1.0.0 • Public • Published

    @basekits/kit-type

    Essential type checking kit for basekits.

    Install

    npm i @basekits/kit-type

    Usage

    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.


    Install

    npm i @basekits/kit-type

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    10.9 kB

    Total Files

    9

    Last publish

    Collaborators

    • muratgozel