Library API
    Preparing search index...

    Function clone

    • Performs a deep copy using the native structuredClone (if available), falling back to a cleanify JSON strategy otherwise.

      Type Parameters

      • T

      Parameters

      • obj: T

        The object to clone

      • Optionalopts: { transfer: any[] }

        Optional structuredClone transfer options

      Returns T

      A deep copy of the object

      const copy = clone(original);