Skip to content

isPlainObject

Determine if a value is a plain object

185 bytes

Usage

Pass in a value and get a boolean telling you if the value is a plain object.

import * as
import _
_
from 'radashi'
import _
_
.
function isPlainObject(value: any): value is object
export isPlainObject

Return true if the given value is a plain object.

@seehttps://radashi.js.org/reference/typed/isPlainObject

@example

isPlainObject({}) // => true
isPlainObject(new Map()) // => false

@version12.2.0

isPlainObject
({}) // => true
import _
_
.
function isPlainObject(value: any): value is object
export isPlainObject

Return true if the given value is a plain object.

@seehttps://radashi.js.org/reference/typed/isPlainObject

@example

isPlainObject({}) // => true
isPlainObject(new Map()) // => false

@version12.2.0

isPlainObject
(
var Object: ObjectConstructor

Provides functionality common to all JavaScript objects.

Object
.
ObjectConstructor.create(o: object | null): any (+1 overload)

Creates an object that has the specified prototype or that has null prototype.

@paramo Object to use as a prototype. May be null.

create
(null)) // => true
import _
_
.
function isPlainObject(value: any): value is object
export isPlainObject

Return true if the given value is a plain object.

@seehttps://radashi.js.org/reference/typed/isPlainObject

@example

isPlainObject({}) // => true
isPlainObject(new Map()) // => false

@version12.2.0

isPlainObject
([]) // => false
import _
_
.
function isPlainObject(value: any): value is object
export isPlainObject

Return true if the given value is a plain object.

@seehttps://radashi.js.org/reference/typed/isPlainObject

@example

isPlainObject({}) // => true
isPlainObject(new Map()) // => false

@version12.2.0

isPlainObject
(null) // => false
import _
_
.
function isPlainObject(value: any): value is object
export isPlainObject

Return true if the given value is a plain object.

@seehttps://radashi.js.org/reference/typed/isPlainObject

@example

isPlainObject({}) // => true
isPlainObject(new Map()) // => false

@version12.2.0

isPlainObject
(new
var Date: DateConstructor
new () => Date (+3 overloads)
Date
()) // => false