JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q40749F
  • 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 aPlainObj from 'a-plain-obj'

aPlainObj({})
// true

Overview

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

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

NPM Version