Checks if an object is empty (has no own properties).

isEmptyObject({}) // true
isEmptyObject({ key: 'value' }) // false
  • Parameters

    • obj: Record<string, unknown> = {}

      The object to check.

    Returns boolean

    true if the object is empty, false otherwise.