Creates a Sequence of [key, value] pairs from a plain object, equivalent to asSequence(Object.entries(obj)) but with entry-aware methods available (mapKeys, mapValues, toObject).
Sequence
[key, value]
asSequence(Object.entries(obj))
mapKeys
mapValues
toObject
The object type.
The object whose own enumerable string-keyed entries are used.
entriesOf({ name: 'yoda', side: 'light' }) .mapKeys(k => k.toUpperCase()) .mapValues(v => v.toUpperCase()) .toObject(); // { NAME: 'YODA', SIDE: 'LIGHT' } Copy
entriesOf({ name: 'yoda', side: 'light' }) .mapKeys(k => k.toUpperCase()) .mapValues(v => v.toUpperCase()) .toObject(); // { NAME: 'YODA', SIDE: 'LIGHT' }
Creates a
Sequenceof[key, value]pairs from a plain object, equivalent toasSequence(Object.entries(obj))but with entry-aware methods available (mapKeys,mapValues,toObject).