2.0.2 • Published 9 months ago
@pacote/is-plain-object v2.0.2
@pacote/is-plain-object
Checks whether the provided value is a plain JavaScript object.
Installation
yarn add @pacote/is-plain-object
Usage
import { isPlainObject } from '@pacote/is-plain-object'
// These return true:
isPlainObject({})
isPlainObject({ an: 'object' })
// All of these return false:
isPlainObject(undefined)
isPlainObject(null)
isPlainObject(false)
isPlainObject(true)
isPlainObject(NaN)
isPlainObject(Infinity)
isPlainObject(0)
isPlainObject('string')
isPlainObject([])
isPlainObject(new ArrayBuffer(0))
isPlainObject(new Date())
isPlainObject(new Map())
isPlainObject(new Promise())
isPlainObject(new Set())
isPlainObject(new WeakMap())
isPlainObject(new WeakSet())
isPlainObject(o: any): boolean
isPlainObject()
takes a single value and checks whether it is a plain object. May be used as a type guard.
License
MIT © Luís Rodrigues.
2.0.2
9 months ago
2.0.1
1 year ago
2.0.0
1 year ago
1.2.1
3 years ago
1.2.0
3 years ago
1.1.6
3 years ago
1.1.5
3 years ago
1.1.4
4 years ago
1.1.3
4 years ago
1.1.2
4 years ago
1.1.1
4 years ago
1.1.0
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago