1.0.0 • Published 7 years ago
@ngard/tiny-isplainobject v1.0.0
tiny-isplainobject
A minimal-weight utility equivalent to lodash.isPlainObject. For when every byte counts!
lodash.isplainobject
tiny-isplainobject
Syntax
isPlainObject(/* object */)Parameters
object - An object (or any value) to check
Return
true if value is a plain object, that is, an object created by the Object constructor or one with a [[Prototype]] of null. false otherwise.
Example
import { isPlainObject } from '@ngard/tiny-isplainobject';
isPlainObject({ a: 1 }); // true
isPlainObject(Object.create(null)); // true
isPlainObject(null); // false
isPlainObject([1,2,3]); // false
isPlainObject(new Set()); // false1.0.0
7 years ago