import { isPlainObject } from "https://deno.land/x/ayonli_jsext@v0.9.72/object/index.ts";
Returns true
is the given value is a plain object, that is, an object created by
the Object
constructor or one with a [[Prototype]]
of null
.
Examples
Example 1
Example 1
import { isPlainObject } from "@ayonli/jsext/object";
console.log(isPlainObject({ foo: "bar" })); // true
console.log(isPlainObject(Object.create(null))); // true
console.log(isPlainObject(new Map([["foo", "bar"]]))); // false