MCPcopy
hub / github.com/webpack/webpack / constructor

Method constructor

lib/util/TupleSet.js:27–37  ·  view source on GitHub ↗

* Seeds the tuple set with an optional iterable of tuples. * @param {Iterable<[T, V, ...EXPECTED_ANY]>=} init init

(init)

Source from the content-addressed store, hash-verified

25 * @param {Iterable<[T, V, ...EXPECTED_ANY]>=} init init
26 */
27 constructor(init) {
28 /** @type {InnerMap<T, V>} */
29 this._map = new Map();
30 /** @type {number} */
31 this.size = 0;
32 if (init) {
33 for (const tuple of init) {
34 this.add(...tuple);
35 }
36 }
37 }
38
39 /**
40 * Adds a tuple to the set, creating any missing prefix maps along the way.

Callers

nothing calls this directly

Calls 1

addMethod · 0.95

Tested by

no test coverage detected