deep-key-mirror
    Preparing search index...

    Function deepKeyMirror

    • Constructs an enumeration with keys equal to their value.

      A string array is mirrored into an object keyed by its elements (e.g. ['a', 'b'] -> { a: 'a', b: 'b' }), while an array containing non-string elements keeps the legacy index-path behaviour.

      Type Parameters

      Parameters

      • obj: T

        the source object (or string array)

      Returns Mirrored<T>

      the mirrored structure