0.1.0 • Published 4 years ago
what-is-this-type v0.1.0
Overview
what-is-this-type - a bunch of functions to make various checks
Installation
To install the stable version:
npm install --save what-is-this-typeDocumentation
isEqual(objectA: any, objectB: any, options: IsEqualOptions)
Checks if the objectA shallowly or deeply equal objectB;
objectA, objectB- any mergeable objectIsEqualOptions- object with following properties:deep?: boolean- make deep checksymbol?: boolean- check symbols properties eitherskipKeys?: string[]- keys to skip checkdeepKeys?: string[]- keys for deep check (only actual whendeepis false)
isNull(value: any)
Checks if the value is strictly null
isUndefined(value: any)
Checks if the value is strictly undefined
isBool(value: any)
Checks if the value is boolean
isNumber(value: any)
Checks if the value is number
isInteger(value: any)
Checks if the value is integer
isString(value: any)
Checks if the value is string
isMergeable(value: any)
Checks if the value is mergeable
isObject(value: any)
Checks if the value is object and not array
isEmpty(value: any)
Checks if the value is mergeable and has no own properties
isSimpleObject(value: any)
Checks if the value is object, not array and has no consturctor (i.e. constructor === Object)
isArray(value: any)
Checks if the value is array
isFunction(value: any)
Checks if the value is function
isPromise(value: any)
Checks if the value is promise
0.1.0
4 years ago