MCPcopy
hub / github.com/webpack/webpack / get

Method get

lib/util/runtime.js:476–489  ·  view source on GitHub ↗

* Returns value. * @param {RuntimeSpec} runtime the runtimes * @returns {R | undefined} value

(runtime)

Source from the content-addressed store, hash-verified

474 * @returns {R | undefined} value
475 */
476 get(runtime) {
477 switch (this._mode) {
478 case 0:
479 return;
480 case 1:
481 return runtimeEqual(this._singleRuntime, runtime)
482 ? this._singleValue
483 : undefined;
484 default:
485 return /** @type {RuntimeSpecMapInnerMap<R>} */ (this._map).get(
486 getRuntimeKey(runtime)
487 );
488 }
489 }
490
491 /**
492 * Returns true, when the runtime is stored.

Callers 3

getEntryRuntimeFunction · 0.45
provideMethod · 0.45
updateMethod · 0.45

Calls 2

runtimeEqualFunction · 0.85
getRuntimeKeyFunction · 0.85

Tested by

no test coverage detected