can-cid/set/set
Exports the native Set or a polyfill.
Map
Use
This module exports the native Set
object if Set
is present. If not, a Set
-like constructor function is exported that supports O(1)
insertion and
deletion by adding a can-cid property to objects passed to .set
.
var Set = require("can-util/js/cid-set/cid-set");
var map = new set();
var obj = {};
map.add(obj);
map.has(obj) //-> true;
The following methods and properties are supported by the polyfill:
clear()
delete(value)
forEach(callback[,thisArg])
get(value)
has(value)
add(value)
size