type-judge
v1.0.8
Published
A small module to check javascript type
Downloads
1
Maintainers
Readme
type-judge
The library exported as Node.js modules.
Installation
Using npm:
$ npm i -g npm
$ npm i --save type-judge
Example
import jsType from type-judge
jsType.isBoolean()
jsType.isNumber()
jsType.isString()
jsType.isFunction()
jsType.isArray()
jsType.isDate()
jsType.isRegExp()
jsType.isObject()
jsType.isError()
console.log(jsType.isBoolean([1, 2, 3]))
// => false
console.log(jsType.isBoolean(false))
// => true