@ngard/tiny-isplainobject

1.0.0 • Public • Published

tiny-isplainobject

source bundle size build status license

A minimal-weight utility equivalent to lodash.isPlainObject. For when every byte counts!


lodash.isplainobject bundle size
tiny-isplainobject bundle size


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()); // false

Package Sidebar

Install

npm i @ngard/tiny-isplainobject

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

10.6 kB

Total Files

8

Last publish

Collaborators

  • ngard