2.1.7 • Published 4 years ago

is-it-object v2.1.7

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

isObject

NPM

Build Status Coverage Status Maintainability PRs Welcome

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