MCPcopy
hub / github.com/mozilla/source-map / join

Method join

lib/source-node.js:258–272  ·  view source on GitHub ↗

* Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between * each of `this.children`. * * @param aSep The separator.

(aSep)

Source from the content-addressed store, hash-verified

256 * @param aSep The separator.
257 */
258 join(aSep) {
259 let newChildren;
260 let i;
261 const len = this.children.length;
262 if (len > 0) {
263 newChildren = [];
264 for (i = 0; i < len - 1; i++) {
265 newChildren.push(this.children[i]);
266 newChildren.push(aSep);
267 }
268 newChildren.push(this.children[i]);
269 this.children = newChildren;
270 }
271 return this;
272 }
273
274 /**
275 * Call String.prototype.replace on the very right-most source snippet. Useful

Callers 12

computeRelativeURLFunction · 0.80
addMappingWithCodeMethod · 0.80
read-wasm.jsFile · 0.80
applySourceMapMethod · 0.80
assertMappingFunction · 0.80
assertEqualMapsFunction · 0.80
test-util.jsFile · 0.80
updateTestSourceMapFunction · 0.80
benchOnClickFunction · 0.80
webpack.config.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected