3 ms·
If you're ok with string keys, you can always do `new Map(Object.entries(obj))`. Alternatively, just implement the `iterable` interface on your custom data type
by james-mcelwain 8y ago
If you're ok with string keys, you can always do `new Map(Object.entries(obj))`. Alternatively, just implement the `iterable` interface on your custom data type.
Literals are nice sugar, but it hardly seems "ham handed".
- Waterluvian 8y agoEverything is sugar. The right sweetness makes the language.
- deleted 8y ago[deleted]