提交学习笔记专用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
291 B

  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. }