is-plain-object-x

2.1.2 • Public • Published

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

is-plain-object-x

Tests if a value is a plain object.

module.exportsboolean

This method tests if value is a plain object, that is, an object created by the Object constructor or one with a [[Prototype]] of null.

Kind: Exported member
Returns: boolean - True if a plain object, otherwise false.

Param Type Description
value * The value to test.

Example

import isPlainObject from 'is-plain-object-x';
 
function Foo() {
  this.a = 1;
}
 
isPlainObject(new Foo()); // => false
isPlainObject([1, 2, 3]); // => false
isPlainObject({x: 0, y: 0}); // => true
isPlainObject(Object.create(null)); // => true

Package Sidebar

Install

npm i is-plain-object-x

Weekly Downloads

0

Version

2.1.2

License

MIT

Unpacked Size

258 kB

Total Files

11

Last publish

Collaborators

  • xotic750