Function asObject

Returns x if x is an object (including array), otherwise returns {} (empty object).

  • Parameters

    • x: unknown

    Returns object