obj-type
v1.0.1
Published
Returns any kind of object's type.
Downloads
1,874
Maintainers
Readme
obj-type
Returns any kind of object's type.
Regexp, array, etc. are objects in JavaScript.
Install
$ npm install --save obj-type
Usage
var objType = require('obj-type');
objType({foo: 'bar'});
//=> 'object'
objType(/foo/);
//=> 'regexp'
objType(['foo', 'bar']);
//=> 'array'
objType(new Date());
//=> 'date'
objType(null);
//=> 'null'
License
MIT © Andreas Gillström