@pengzhanbo/utils - v3.7.3
    Preparing search index...

    Function isEmptyObject

    • Checks if the input is an empty object.

      检查输入是否为空对象。

      Parameters

      • v: unknown

        The value to check. 要检查的值

      Returns boolean

      True if the value is an empty object, false otherwise. 如果值为空对象则返回 true,否则返回 false

      This function uses for...in to enumerate enumerable string-keyed properties. Symbol-keyed properties are skipped by for...in, so an object containing only Symbol-keyed properties would be incorrectly reported as empty.

      该函数使用 for...in 枚举可枚举的字符串键属性。 for...in 会跳过 Symbol 键属性,因此仅包含 Symbol 键属性的对象会被错误地报告为空。

      isEmptyObject({}) // => true
      isEmptyObject({ a: 1 }) // => false