MCPcopy Index your code
hub / github.com/nodejs/node / set

Method set

lib/internal/source_map/source_map_cache_map.js:67–72  ·  view source on GitHub ↗

* Sets the value for the given key, associated with the given module * instance. * @param {string[]} keys array of urls to index the value entry. * @param {*} sourceMapData the value entry. * @param {object} moduleInstance an object that can be weakly referenced and * invalidate the

(keys, sourceMapData, moduleInstance)

Source from the content-addressed store, hash-verified

65 * invalidate the [key, value] entry after this object is reclaimed.
66 */
67 set(keys, sourceMapData, moduleInstance) {
68 const weakRef = new SafeWeakRef(moduleInstance);
69 ArrayPrototypeForEach(keys, (key) => this.#weakModuleMap.set(key, weakRef));
70 moduleInstance[source_map_data_private_symbol] = sourceMapData;
71 this.#finalizationRegistry.register(moduleInstance, { keys });
72 }
73
74 /**
75 * Get an entry by the given key.

Callers 3

maybeCacheSourceMapFunction · 0.45
fromReadableFunction · 0.45
fromWritableFunction · 0.45

Calls 1

registerMethod · 0.45

Tested by

no test coverage detected