Library API
    Preparing search index...

    Function asObject

    • Recursively converts an object or class/host instance with prototype getters into a plain object. Returns the original value if it is not an object or is nullish, or specialized types (Date, RegExp, Map, Set).

      Type Parameters

      • T

      Parameters

      • Optionalobj: Record<PropertyKey, any>

        The object to convert

      Returns T

      A new plain object with copied/evaluated properties

      const copy = asObject({ a: 1 });