isobject
Returns true if the value is an object and not an array or null.
Last updated 3 months ago by GitHub Actions .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install isobject 
SYNC missed versions from official npm registry.

isobject

npm version npm downloads CI

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

Please consider following this project's author, Jon Schlinkert, and starring the project to show your ❤️ and support.

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

Install

npm install isobject

Usage

const isObject = require('isobject');

isObject({});                      // true
isObject(Object.create(null));     // true
isObject(new Date());              // true
isObject(/foo/);                   // true

isObject();                        // false
isObject(null);                    // false
isObject([]);                      // false
isObject(() => {});                // false
isObject('foo');                   // false

API

isObject(value)

Returns true when value is a non-null object and is not an array. Functions return false.

Development

Install dependencies, build the CommonJS bundle, and run the tests:

npm install
npm run build
npm test

Related projects

  • extend-shallow: Extend an object with the properties of additional objects.
  • is-plain-object: Check if an object was created by the Object constructor.
  • kind-of: Get the native type of a value.
  • merge-deep: Recursively merge values in an object.

License

MIT © Jon Schlinkert

Current Tags

  • 4.1.1                                ...           latest (3 months ago)

12 Versions

  • 4.1.1                                ...           3 months ago
  • 4.0.0                                ...           8 years ago
  • 3.0.1                                ...           9 years ago
  • 3.0.0                                ...           10 years ago
  • 2.1.0                                ...           11 years ago
  • 2.0.0                                ...           11 years ago
  • 1.0.2                                ...           11 years ago
  • 1.0.1                                ...           11 years ago
  • 1.0.0                                ...           12 years ago
  • 0.2.0                                ...           12 years ago
  • 0.1.1                                ...           12 years ago
  • 0.1.0                                ...           12 years ago
Downloads
Total 26
Today 0
This Week 0
This Month 15
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE