Skip to content

Checks whether a value is an object, because typeof is a troll

License

Notifications You must be signed in to change notification settings

inspect-js/is-object

Folders and files

NameName
Last commit message
Last commit date
Nov 1, 2022
Nov 19, 2019
Nov 19, 2019
Nov 1, 2022
Nov 19, 2019
May 6, 2021
Mar 13, 2013
Dec 2, 2020
Sep 2, 2014
May 6, 2021
Sep 27, 2014
Nov 1, 2022

Repository files navigation

is-object Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Checks whether a value is an object

Because typeof null is a troll.

Example

var isObject = require('is-object');
var assert = require('assert');

assert.equal(isObject(null), false);
assert.equal(isObject({}), true);

Installation

npm install is-object

Contributors

MIT Licensed