1.0.4 • Published 9 years ago

@denismitr/is v1.0.4

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

#API TO CHECK DATA TYPES IN JAVASCRIPT (NODE VERSION)

##Version 1.0

##Author: Denis Mitrofanov

###Usage

!!All API methods return true or false!!

var p = {};
is._object(p) // true
is._array(p) //false
is._undefined // false

!! Pay attention: additional helper methods do not start with underscore
is.set(p) //true because not equals to null or undefined
is.empty(p) // true

var n = 10;
is._numeric(n) //true
is._boolean(n) //false

var arr = [4, 5, 9];
is._array(arr) //true
is.empty(arr) //false

var und;
is._undefined(und) //true
is.set(und) //false
is.empty(und) //true

var s = "";
is._string(s) //true
is.empty(s) //true