MCPcopy
hub / github.com/webpack/webpack / storePromise

Method storePromise

lib/CacheFacade.js:166–176  ·  view source on GitHub ↗

* Stores the provided data. * @template T * @param {T} data the value to store * @returns {Promise<void>} promise signals when the value is stored

(data)

Source from the content-addressed store, hash-verified

164 * @returns {Promise<void>} promise signals when the value is stored
165 */
166 storePromise(data) {
167 return new Promise((resolve, reject) => {
168 this._cache.store(this._name, this._etag, data, (err) => {
169 if (err) {
170 reject(err);
171 } else {
172 resolve();
173 }
174 });
175 });
176 }
177
178 /**
179 * Processes the provided computer.

Callers 1

providePromiseMethod · 0.95

Calls 2

resolveFunction · 0.85
storeMethod · 0.45

Tested by

no test coverage detected