What is a WeakMap?
This article explains how JavaScript’s WeakMap does not retain its keys, comparing it with a regular Map and using code examples. It covers auxiliary information for objects, key identity, the reason it cannot be enumerated, references from values to keys, and handling of ephemerons.