79646051

Date: 2025-05-30 20:25:40
Score: 0.5
Natty:
Report link

Creating the Map from an array is the way to go here: if you use a temporary object in between, the keys are converted to string.

const m = Map([[10,'ten']])
m.get(10)
// 'ten' 

https://immutable-js.com/play/#Y29uc3QgbSA9IE1hcChbWzEwLCd0ZW4nXV0pCm0uZ2V0KDEwKQ==

Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: Julien Deniau