isEmptyObject.js 291 B

12345678
  1. import { isPlainObject } from './isPlainObject.js';
  2. /**
  3. * Returns whether the payload is a an empty object (excluding special classes or objects with other
  4. * prototypes)
  5. */
  6. export function isEmptyObject(payload) {
  7. return isPlainObject(payload) && Object.keys(payload).length === 0;
  8. }