@bemoje/is-plain-object

True if value is a plain object.

Usage no npm install needed!

<script type="module">
  import bemojeIsPlainObject from 'https://cdn.skypack.dev/@bemoje/is-plain-object';
</script>

README

@bemoje/is-plain-object

True if value is a plain object.

Version

NPM version

Travis CI

dependencies

Dependencies

dependencies

Stats

NPM downloads Forks

Donate

Buy Me A Beer donate button PayPal donate button

Installation

npm install @bemoje/is-plain-object
npm install --save @bemoje/is-plain-object
npm install --save-dev @bemoje/is-plain-object

Usage


import isPlainObject from '@bemoje/is-plain-object'

isPlainObject({})
//=> true

isPlainObject({ a: 1 })
//=> true

isPlainObject(Object.create(null))
//=> false

isPlainObject(/regex/)
//=> false

Tests

Uses Jest to test module functionality. Run tests to get coverage details.

npm run test

API

Table of Contents

isPlainObject

True if value is a plain object.

Parameters
  • value any The value to evaluate

Returns boolean boolean