JavaScript WeakMaps are not actually weak: they refer strongly to their contents as long as the key is alive.
This brings the list of imprecisely-named ECMAScript APIs to:
Map → OrderedMap
Set → OrderedSet
Promise.race → Promise.anySettled
WeakMap → Ephemeron
-
-
But not in any user controllable order to my knowledge.. the order that the entries are presented is implementation-dependent, right?
-
That is true for object key/value pairs but not for Maps/Sets.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.