1.0.9 • Published 7 years ago

type-predicate-utils v1.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
7 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

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago