MCPcopy Index your code
hub / github.com/mozilla/source-map / add

Method add

lib/array-set.js:46–55  ·  view source on GitHub ↗

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

(aStr, aAllowDuplicates)

Source from the content-addressed store, hash-verified

44 * @param String aStr
45 */
46 add(aStr, aAllowDuplicates) {
47 const isDuplicate = this.has(aStr);
48 const idx = this._array.length;
49 if (!isDuplicate || aAllowDuplicates) {
50 this._array.push(aStr);
51 }
52 if (!isDuplicate) {
53 this._set.set(aStr, idx);
54 }
55 }
56
57 /**
58 * Is the given string a member of this set?

Callers 10

fromArrayMethod · 0.95
applySourceMapMethod · 0.95
makeTestSetFunction · 0.95
parse_call_graphFunction · 0.45
reverse_call_graphFunction · 0.45
print_callersFunction · 0.45
fromSourceMapMethod · 0.45
addMappingMethod · 0.45
test-array-set.jsFile · 0.45

Calls 1

hasMethod · 0.95

Tested by

no test coverage detected