is-obj
Check if a value is an object
Last updated 4 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install is-obj 
SYNC missed versions from official npm registry.

is-obj

Check if a value is an object

Keep in mind that array, function, regexp, etc, are objects in JavaScript.

See is-plain-obj if you want to check for plain objects.

Install

$ npm install is-obj

Usage

import isObject from 'is-obj';

isObject({foo: 'bar'});
//=> true

isObject([1, 2, 3]);
//=> true

isObject('foo');
//=> false

Related

  • is - Type check values

Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Current Tags

  • 3.0.0                                ...           latest (4 years ago)

4 Versions

  • 3.0.0                                ...           4 years ago
  • 2.0.0                                ...           6 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 2
Last Day 0
Last Week 1
Last Month 7
Dependencies (0)
None
Dev Dependencies (3)

Copyright 2013 - present © cnpmjs.org | Home |