is-it-object
v2.1.7
Published
Tiny package which helps to check that value is an object in JavaScript.
Downloads
74
Maintainers
Readme
isObject
Most powerful way to check that value is an object in javascript
.
More info about motivation for this repo you can find here.
Installation
npm i is-it-object
Usage
const isObject = require('is-it-object');
isObject({}); // true
isObject([]); // false
isObject(undefined); // false
isObject(null); // false
isObject(0); // false
isObject(''); // false
isObject(/.*/); // true
isObject(new Date()); // true
isObject(function () {}); // false
isObject(Object.create({})); // true
isObject(Object.create(null)); // true
isObject(Object.create(Object.prototype)); // true
More information available here.
Tests
npm test