Node.js lodash isObject() Determining Object Type

Description

Node.js lodash isObject() Determining Object Type



var _ = require('lodash');

// test object type

// true/*from  w  ww.j av a2 s  . c o  m*/
console.log(_.isObject([ 1 ]));

console.log(_.isObject({}));

// false
console.log(_.isObject(1));

console.log(_.isObject(null));

console.log(_.isObject(undefined));



PreviousNext

Related