You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
606 B

4 years ago
  1. # is-obj [![Build Status](https://travis-ci.org/sindresorhus/is-obj.svg?branch=master)](https://travis-ci.org/sindresorhus/is-obj)
  2. > Check if a value is an object
  3. Keep in mind that array, function, regexp, etc, are objects in JavaScript.<br>
  4. See [`is-plain-obj`](https://github.com/sindresorhus/is-plain-obj) if you want to check for plain objects.
  5. ## Install
  6. ```
  7. $ npm install --save is-obj
  8. ```
  9. ## Usage
  10. ```js
  11. const isObj = require('is-obj');
  12. isObj({foo: 'bar'});
  13. //=> true
  14. isObj([1, 2, 3]);
  15. //=> true
  16. isObj('foo');
  17. //=> false
  18. ```
  19. ## License
  20. MIT © [Sindre Sorhus](https://sindresorhus.com)