JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 56293291
  • Score
    100M100P100Q243846F
  • License

Returns true if an object was created by the `Object` constructor.

Package Exports

  • is-plain-object
  • is-plain-object/index

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-plain-object) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-plain-object NPM version

Returns true if an object was created by the Object constructor.

Use isobject if you only want to check if the value is an object and not an array or null.

Install with npm

npm i is-plain-object --save

Running tests

Install dev dependencies.

npm i -d && npm test

Usage

var isPlainObject = require('is-plain-object');

true when created by the Object constructor.

isPlainObject(Object.create({}));
//=> true
isPlainObject(Object.create(Object.prototype));
//=> true
isPlainObject({foo: 'bar'});
//=> true
isPlainObject({});
//=> true

false when not created by the Object constructor.

isPlainObject(1);
//=> false
isPlainObject(['foo', 'bar']);
//=> false
isPlainObject([]);
//=> false
isPlainObject(new Foo);
//=> false
isPlainObject(null);
//=> false
isPlainObject(Object.create(null));
//=> false

Author

Jon Schlinkert

License

Copyright (c) 2015 Jon Schlinkert
Released under the MIT license


This file was generated by verb on February 25, 2015.