Have ideas to improve npm?Join in the discussion! »

    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

    Install

    npm i is-it-object

    DownloadsWeekly Downloads

    3

    Version

    2.1.7

    License

    MIT

    Unpacked Size

    6.1 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar