You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

isobject

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isobject

Returns true if the value is an object and not an array or null.

Source
npmnpm
Version
2.1.0
Version published
Weekly downloads
46M
-14.71%
Maintainers
2
Weekly downloads
 
Created
Source

isobject NPM version NPM downloads Build Status

Returns true if the value is an object and not an array or null.

Install

Install with npm:

$ npm install isobject --save

Use is-plain-object if you want only objects that are created by the Object constructor.

Install

Install with npm:

$ npm install isobject

Install with bower

$ bower install isobject

Usage

var isObject = require('isobject');

True

All of the following return true:

isObject({});
isObject(Object.create({}));
isObject(Object.create(Object.prototype));
isObject(Object.create(null));
isObject({});
isObject(new Foo);
isObject(/foo/);

False

All of the following return false:

isObject();
isObject(function () {});
isObject(1);
isObject([]);
isObject(undefined);
isObject(null);

You might also be interested in these projects:

merge-deep: Recursively merge values in a javascript object. | homepage

  • extend-shallow: Extend an object with the properties of additional objects. node.js/javascript util. | homepage
  • is-plain-object: Returns true if an object was created by the Object constructor. | homepage
  • kind-of: Get the native type of a value. | homepage

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

Generate readme and API documentation with verb:

$ npm install verb && npm run docs

Or, if verb is installed globally:

$ verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.

This file was generated by verb, v0.9.0, on April 25, 2016.

Keywords

check

FAQs

Package last updated on 25 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts