Skip to content
Snippets Groups Projects
Select Git revision
  • develop
  • master default
  • map_stuff
  • bullet
  • player_stuff
  • enemy
  • login_page
  • mob_stuff
  • register_page
9 results

is-obj

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Jacky Chen authored
    e44240c3
    History

    is-obj Build Status

    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

    const isObject = require('is-obj');
    
    isObject({foo: 'bar'});
    //=> true
    
    isObject([1, 2, 3]);
    //=> true
    
    isObject('foo');
    //=> false

    Related

    • is - Type check values

    License

    MIT © Sindre Sorhus