MCPcopy Index your code
hub / github.com/microsoft/SandDance / intern_set

Function intern_set

docs/app/js/sanddance-app.js:110726–110731  ·  view source on GitHub ↗
({ _intern , _key  }, value)

Source from the content-addressed store, hash-verified

110724 return _intern.has(key) ? _intern.get(key) : value;
110725}
110726function intern_set({ _intern , _key }, value) {
110727 const key = _key(value);
110728 if (_intern.has(key)) return _intern.get(key);
110729 _intern.set(key, value);
110730 return value;
110731}
110732function intern_delete({ _intern , _key }, value) {
110733 const key = _key(value);
110734 if (_intern.has(key)) {

Callers 2

setMethod · 0.70
addMethod · 0.70

Calls 3

hasMethod · 0.45
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected