Returns any kind of object's type.
Regexp, array, etc. are objects in JavaScript.
$ npm install --save obj-type
const objType = require('obj-type');
objType({foo: 'bar'});
//=> 'object'
objType(/foo/);
//=> 'regexp'
objType(['foo', 'bar']);
//=> 'array'
objType(new Date());
//=> 'date'
objType(null);
//=> 'null'
MIT © Andreas Gillström