isPlainObject.js 265 B

12345678910111213
  1. /**
  2. * Checks if the value is created by the `Object` constructor.
  3. */
  4. function isPlainObject(value) {
  5. return (!!value && typeof value === 'object' &&
  6. value.constructor === Object);
  7. }
  8. module.exports = isPlainObject;