@guseyn/cutie-is

Cutie extension for checking types in JavaScript.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@guseyn/cutie-is
181.0.54 years ago4 years agoMinified + gzip package size for @guseyn/cutie-is in KB

Readme

cutie-is
Cutie extension for checking types in JavaScript.
cutie-assert
!NPM Versionnpm-imagenpm-url
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.
Usage
const {
  // Here needed async objects from the table below
} = require('@cuties/is');

| Async Object | Async/sync call | Parameters | Representation result | | ------------- | ----------------| ---------- | --------------------- | | Is | value instanceof clazz | value, clazz | boolean | | IsArray | Array.isArray | value | boolean | | IsBoolean | typeof value === 'boolean' | value | boolean | | IsDate | typeof value instanceof Date | value | boolean | | IsNull | typeof value === null | value | boolean | | IsNumber | typeof value === 'number' | value | boolean | | IsObject | typeof value === 'object' | value | boolean | | IsRealObject | typeof value === 'object' && value !== null | value | boolean | | IsString | typeof value === 'string' | value | boolean | | IsSymbol | typeof value === 'symbol' | value | boolean | | IsUndefined | typeof value === 'undefined' | value | boolean |