1.0.9 • Published 5 years ago

type-predicate-utils v1.0.9

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

type-predicate-utils

Build Status Coverage Status npm version

Description:

A collection of simple predicate functions, written in TypeScript, for checking variable types. JavaScript UMD and TypeScript declaration file will be generated when building the package.

Installation:

npm install type-predicate-utils

Usage:

import { 
    isString, 
    isBoolean, 
    isDefined, 
    isUndefined, 
    isNull, 
    isObject,
    isArray,
    isEmptyArray,
    isNonEmptyArray,
    isFunction
 } from 'type-predicate-utils';

...

isString('foo')       // true
isBoolean({})         // false
isDefined([])         // true
isUndefined({})       // false
isNull(null)          // true
isObject({})          // true
isArray([])           // true
isEmptyArray([])      // true
isNonEmptyArray([])   // false
isFunction(() => {})  // true
1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago