code: function isPlainObject(value) {
    return (
      isObject(value) &&
      (!value.constructor || value.constructor === Object) &&
      (!value.toString || value.toString === Object.prototype.toString)
    );
  }
docs: Quick and dirty check if an object is a plain object and not for example an instance of some class.