3.0.0 • Published 5 months ago

is-plain-obj v3.0.0

Weekly downloads
19,924,666
License
MIT
Repository
github
Last release
5 months ago

is-plain-obj Build Status

Check if a value is a plain object

An object is plain if it's created by either {}, new Object(), or Object.create(null).

Install

$ npm install is-plain-obj

Usage

const isPlainObject = require('is-plain-obj');

isPlainObject({foo: 'bar'});
//=> true

isPlainObject(new Object());
//=> true

isPlainObject(Object.create(null));
//=> true

isPlainObject([1, 2, 3]);
//=> false

class Unicorn {}
isPlainObject(new Unicorn());
//=> false

Related

  • is-obj - Check if a value is an object
  • is - Type check values

sort-keysstrip-dirsminimist-optionsunifiedyargs-unparserwrite-json-file@care-for/yargs-unparserreact-native-bluetooth2killi8n-react-native-fast-imagevietmap-sdk@cashremit/cr-streamline-iconscloud-archive-s3airscanairscan-examplebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxfvalidatemvue-compmentsequelize-wherevalidate-glob-opts@f0x52/scoutvandelaywebpack-servewebpack-serve-node6@igniswap/igni-swap-libvietmaps-sdkwotchawrite-fileswrite-file-atomicallyxmatempest.jstest-each@ericmcornelius/easetar-to-filetapshottechfox-icontechfox-react-feathertokei-jsto-executable-nametransform-json-schema@etpinard/gl-textunified-engineunix-permissionsthomzz-hexo-theme-doctime-objecttribe-amqptranztranz-commit-icafe-closetree-shortcut@eliteswap/v2-corestringify-object-es5stringify-object-extract-functionsstringify-object-stringsstringify-object-with-one-linersstringify-object-with-onelinestring-replace-with-objectsmart-stringify-objectspydsns-to-slacksort-keys-by-valuesort-keys-with-contextsort-package-jsonsort-package-json-without-scriptssort-package-json3sanersearch-input-reactsearch-list-react@geeky-apo/react-native-advanced-clipboardwaveareaweb-component-tester-bundle@hemith/react-native-tnk@hanlindev/cancanweb-audio-stream@hawkingnetwork/react-native-tab-viewsettings-panelshayurosid-handler-componentsredx-vueredux-immutable-combine-reducersredux-storage-engine-electron-storeresponsive-react-apprestore-npm-cachesindresorhus.jswezi-send@icedesign/iceworks-scaffolder@mapbox/mapbox-sdk@mapbox/fusspotwpk-manager@mapbox/babel-preset-mapbox@ladjs/loggerzorro-unified@materia-dex/materia-contracts-proxy@maven-io/webpack-serve@kristoffertonning/vue-laravel-errorsreaddir-sortedread-utf8-filereaktivreal-executable-path
3.0.0

5 months ago

2.1.0

1 year ago

2.0.0

2 years ago

1.1.0

5 years ago

1.0.0

6 years ago