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.
['a', 'b']
{ a: 'a', b: 'b' }
the source object (or string array)
the mirrored structure
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.