is-it-object

2.1.7 • Public • Published

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

/is-it-object/

    Package Sidebar

    Install

    npm i is-it-object

    Weekly Downloads

    9

    Version

    2.1.7

    License

    MIT

    Unpacked Size

    6.1 kB

    Total Files

    8

    Last publish

    Collaborators

    • cn007b