Library API
    Preparing search index...

    Function cloneify

    • Deep-copies an Object, optionally replacing <undefined> fields with a Sentinel function call. Leverages stringify and objectify.

      Type Parameters

      • T

      Parameters

      • obj: T

        The object to cloneify

      • Optionalsentinel: Function

        An optional function to handle reconstructed undefined values

      Returns T

      The deep-copied object

      const safeCopy = cloneify(original, () => null);