package
Returns true if an object was created by the `Object` constructor, or Object.create(null).
npm install is-plain-objectGitHub-flavored package documentation.
Across all versions, last 30 days.
384,050,763 in 30 days
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
6.6 kB
Includes dependencies.
Returns
trueif an object was created by theObjectconstructor or with anullprototype.
Please consider following this project's author, Jon Schlinkert, and starring the project to show your ❤️ and support.
Use isobject if you only want to check whether a value is an object and not an array or null.
npm install is-plain-objectWith ES modules:
import { isPlainObject } from 'is-plain-object';
isPlainObject({}); // true
isPlainObject({ foo: 'bar' }); // true
isPlainObject(Object.create(null)); // true
isPlainObject(Object.create({})); // true
isPlainObject(); // false
isPlainObject(null); // false
isPlainObject([]); // false
isPlainObject(new Date()); // false
isPlainObject(/foo/); // false
isPlainObject(() => {}); // falseWith CommonJS:
const { isPlainObject } = require('is-plain-object');isPlainObject(value)Returns true when value is a plain object. Objects created by the Object constructor and objects with a null prototype are considered plain.
Install dependencies, build the CommonJS and ES module bundles, and run the tests:
npm install
npm run build
npm testnull.MIT © Jon Schlinkert
trysound
opensource@trysound.io