1.3.0 • Published 7 years ago

type-checks v1.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Build Status

Simple type checks

This is a minimal helper library for type checking in JavaScript. In most cases you will NOT need it. The only case where this comes handy when you have to do a lot of type checking in your code. In these cases writing multiple typeof myvalue === 'whatever' can become quite noisy.

API

functionCheck if
isUndef...value is undefined
isNull...value is null
isNullOrUndef...value is undefined or null
isString...value is a string
isNumber...value is a number, excluding NaN
isBool...value is a boolean
isDate...value is a Date-object
isFormatDate...value has the format YYYY-MM-DD
isFormatDateTime...value has the format YYYY-MM-DD hh:mm:ss
isFormatDateUTC...value has the format YYYY-MM-DDThh:mm:ssZ
isObject...value is an Object (Note: Arrays are objects too)
isEmpty...value is "", {}, [], undefined or null

LICENSE

See LICENSE.md

1.3.0

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago