is-pure-object.js 286 B

1234567891011121314
  1. /**
  2. * Is pure object.
  3. *
  4. * @param value
  5. */
  6. export function isPureObject(value) {
  7. return Boolean(
  8. typeof value === 'object' &&
  9. value &&
  10. !Array.isArray(value) &&
  11. (!value.constructor ||
  12. (value.constructor && value.constructor.name === 'Object')),
  13. );
  14. }