Skip to content
This repository was archived by the owner on Sep 16, 2020. It is now read-only.

cn0047/is-it-object

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

isObject

NPM

Build Status Coverage Status Maintainability PRs Welcome

Most powerful way to check that value is an object in javascript.
More info about motivation for this repo you can find here.

Installation

npm i is-it-object

Usage

const isObject = require('is-it-object');

isObject({});                              // true
isObject([]);                              // false
isObject(undefined);                       // false
isObject(null);                            // false
isObject(0);                               // false
isObject('');                              // false
isObject(/.*/);                            // true
isObject(new Date());                      // true
isObject(function () {});                  // false
isObject(Object.create({}));               // true
isObject(Object.create(null));             // true
isObject(Object.create(Object.prototype)); // true

More information available here.

Tests

npm test

About

Tiny package which helps to check that value is an object in JavaScript.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors