MCPcopy
hub / github.com/vercel/next.js / add

Method add

packages/next/src/compiled/source-map08/source-map.js:52–61  ·  view source on GitHub ↗

* Add the given string to this set. * * @param String aStr

(aStr, aAllowDuplicates)

Source from the content-addressed store, hash-verified

50 * @param String aStr
51 */
52 add(aStr, aAllowDuplicates) {
53 const isDuplicate = this.has(aStr);
54 const idx = this._array.length;
55 if (!isDuplicate || aAllowDuplicates) {
56 this._array.push(aStr);
57 }
58 if (!isDuplicate) {
59 this._set.set(aStr, idx);
60 }
61 }
62
63 /**
64 * Is the given string a member of this set?

Callers 11

fromArrayMethod · 0.95
applySourceMapMethod · 0.95
runFunction · 0.45
simpleSubsetFunction · 0.45
fromSourceMapMethod · 0.45
addMappingMethod · 0.45
addMappingWithCodeMethod · 0.45
source-map.jsFile · 0.45
SourceNodeFunction · 0.45
addMappingWithCodeFunction · 0.45
getUniqueReplacerSetFunction · 0.45

Calls 3

hasMethod · 0.95
pushMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected