@techor/is-plain-obj
TypeScript icon, indicating that this package has built-in type declarations

3.0.23 • Public • Published

Is it a plain object? ~100B

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


Getting Started

npm install @techor/is-plain-obj

Usage

import aPlainObj from '@techor/is-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

/@techor/is-plain-obj/

    Package Sidebar

    Install

    npm i @techor/is-plain-obj

    Homepage

    aron.tw

    Weekly Downloads

    6

    Version

    3.0.23

    License

    MIT

    Unpacked Size

    6.17 kB

    Total Files

    5

    Last publish

    Collaborators

    • 1aron