WeakReferenceMap
Provides a map that only contains keys that are referenced.
new WeakReferenceMap()
Creates a new weak reference map.
Use
var WeakReferenceMap = require("can-connect/helpers/weak-reference-map");
var wrm = new WeakReferenceMap();
var task1 = {id: 1, name: "do dishes"};
wrm.addReference("1", task1);
wrm.has("1") //-> true
wrm.addReference("1", task1);
wrm.has("1") //-> true
wrm.deleteReference("1");
wrm.has("1") //-> true
wrm.deleteReference("1");
wrm.has("1") //-> false