Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 631 Bytes

.verb.md

File metadata and controls

36 lines (27 loc) · 631 Bytes

Use is-plain-object if you want only objects that are created by the Object constructor.

Install

{%= include("install-npm", {save: 'save'}) %}

Usage

import isObject from '{%= name %}';

True

All of the following return true:

isObject({});
isObject(Object.create({}));
isObject(Object.create(Object.prototype));
isObject(Object.create(null));
isObject(new Foo);
isObject(/foo/);

False

All of the following return false:

isObject();
isObject(function () {});
isObject(1);
isObject([]);
isObject(undefined);
isObject(null);