1.0.9 • Published 6 years ago

type-predicate-utils v1.0.9

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

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago