JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q37410F
  • License MIT

Is it a plain object?

Package Exports

  • a-plain-obj

Readme


Is it a plain object? ~100B

NPM Version NPM Version NPM package ( download / month ) Follow @mastercorg Github release actions


Getting Started

npm install a-plain-obj

Usage

import isPlainObject from 'a-plain-obj'

isPlainObject({})
// true

Overview

// true
isPlainObject(Object.create({}))
isPlainObject(Object.create(Object.prototype))
isPlainObject({ foo: 'bar' })
isPlainObject({})
isPlainObject(Object.create(null))

// false
function Foo() { this.abc = {} }
isPlainObject(/foo/)
isPlainObject(function () { })
isPlainObject(1)
isPlainObject(['foo', 'bar'])
isPlainObject([])
isPlainObject(new Foo)
isPlainObject(null)
isPlainObject(undefined)

NPM Version