hawx1993
10/9/2017 - 2:39 AM

plain JavaScript objects

plain JavaScript objects

var _toString = Object.prototype.toString;

/**
 * Strict object type check. Only returns true
 * for plain JavaScript objects.
 */
function isPlainObject (obj) {
  return _toString.call(obj) === '[object Object]'
}