Skip to content

gillstrom/obj-type

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

obj-type Build Status

Returns any kind of object's type.

Regexp, array, etc. are objects in JavaScript.

Install

$ npm install --save obj-type

Usage

const 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

About

Returns any kind of object's type.

Resources

License

Stars

Watchers

Forks

Packages

No packages published