MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / defWeak

Function defWeak

lib/web/polyfill.js:1686–1692  ·  view source on GitHub ↗
(that, key, value)

Source from the content-addressed store, hash-verified

1684 }, collectionMethods);
1685
1686 function defWeak(that, key, value){
1687 if(isFrozen(assertObject(key)))leakStore(that).set(key, value);
1688 else {
1689 has(key, WEAK) || hidden(key, WEAK, {});
1690 key[WEAK][that[UID]] = value;
1691 } return that;
1692 }
1693 function leakStore(that){
1694 return that[LEAK] || hidden(that, LEAK, new Map)[LEAK];
1695 }

Callers 1

polyfill.jsFile · 0.85

Calls 4

assertObjectFunction · 0.85
leakStoreFunction · 0.85
hasFunction · 0.70
setMethod · 0.65

Tested by

no test coverage detected