@Gordon If considered then I think it would require native support to match the spec behavior
Proper Map and Set implementation allow the keys be an arbitrary Object for polyfills that requires the lookup be O(n) instead of O(1) as there AFAIK isn't any other way then to approximately this m.get = (key) => m[ Object.keys(m).find(k => m[k] === key) ].
m.get = (key) => m[ Object.keys(m).find(k => m[k] === key) ]
© Espruino, powered by microcosm.
Report a problem