1.1.3 • Published 5 years ago

@cuties/is v1.1.3

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

cutie-is

NPM Version Build Status codecov

Cutie extension for checking types in JavaScript. It's based on the Async Tree Pattern.

Examples

You can find examples of using this library in the test directory.

Install

npm install @cuties/is

Run test

npm test

Run build

npm run build

Usage

const {
  // Here needed async objects from the table below
} = require('@cuties/is');
Async ObjectAsync/sync callParametersRepresentation result
Isvalue instanceof clazzvalue, clazzboolean
IsArrayArray.isArrayvalueboolean
IsBooleantypeof value === 'boolean'valueboolean
IsDatevalue instanceof Datevalueboolean
IsFunctiontypeof value === 'function'valueboolean
IsNulltypeof value === nullvalueboolean
IsNumbertypeof value === 'number'valueboolean
IsObjecttypeof value === 'object'valueboolean
IsRealObjecttypeof value === 'object' && value !== nullvalueboolean
IsStringtypeof value === 'string'valueboolean
IsSymboltypeof value === 'symbol'valueboolean
IsUndefinedtypeof value === 'undefined'valueboolean