MCPcopy Index your code
hub / github.com/shipshapecode/tether / cache

Method cache

src/js/tether.js:225–237  ·  view source on GitHub ↗
(k, getter)

Source from the content-addressed store, hash-verified

223 }
224
225 cache(k, getter) {
226 // More than one module will often need the same DOM info, so
227 // we keep a cache which is cleared on each position call
228 if (isUndefined(this._cache)) {
229 this._cache = {};
230 }
231
232 if (isUndefined(this._cache[k])) {
233 this._cache[k] = getter.call(this);
234 }
235
236 return this._cache[k];
237 }
238
239 enable(pos = true) {
240 const { classes, classPrefix } = this.options;

Callers 5

positionMethod · 0.95
moveMethod · 0.95
babel.config.jsFile · 0.80
positionFunction · 0.80
positionFunction · 0.80

Calls 1

isUndefinedFunction · 0.90

Tested by

no test coverage detected