canjs / can-connect

Model layer utilities for every JavaScript framework! Assemble real-time, high performance, restful data connections.
https://canjs.com/doc/can-connect.html
MIT License
29 stars 16 forks source link

weak-reference-set does mutiple entries support #486

Closed cherifGsoul closed 5 years ago

cherifGsoul commented 5 years ago

This adds the ability to support multiple entries for weak-reference-set:

var set = new WeakReferenceSet();

var item1 = {};
var item2 = {};
var item3 = {};

set.addReference(item1);
set.addReference(item2);
set.addReference(item3);

set.get(item1) // => item1
set.get(item2) // => item2
set.get(item3) // => item3

Fixes #468