MCPcopy
hub / github.com/webpack/webpack / getPromise

Method getPromise

lib/CacheFacade.js:295–305  ·  view source on GitHub ↗

* Returns promise with the data. * @template T * @param {string} identifier the cache identifier * @param {Etag | null} etag the etag * @returns {Promise<T>} promise with the data

(identifier, etag)

Source from the content-addressed store, hash-verified

293 * @returns {Promise<T>} promise with the data
294 */
295 getPromise(identifier, etag) {
296 return new Promise((resolve, reject) => {
297 this._cache.get(`${this._name}|${identifier}`, etag, (err, data) => {
298 if (err) {
299 reject(err);
300 } else {
301 resolve(data);
302 }
303 });
304 });
305 }
306
307 /**
308 * Processes the provided identifier.

Callers 7

providePromiseMethod · 0.95
nextMethod · 0.45
_applyOnCompilerMethod · 0.45
_loadEnvMethod · 0.45
applyFunction · 0.45
applyFunction · 0.45
applyFunction · 0.45

Calls 2

resolveFunction · 0.85
getMethod · 0.45

Tested by 1

applyFunction · 0.36