MCPcopy
hub / github.com/eslint/eslint / add

Method add

lib/linter/code-path-analysis/fork-context.js:299–305  ·  view source on GitHub ↗

* Adds segments to the head of this context. * @param {Array } segments The segments to add. * @returns {void}

(segments)

Source from the content-addressed store, hash-verified

297 * @returns {void}
298 */
299 add(segments) {
300 assert(
301 segments.length >= this.count,
302 `${segments.length} >= ${this.count}`,
303 );
304 this.segmentsList.push(mergeExtraSegments(this, segments));
305 }
306
307 /**
308 * Replaces the head segments with the given segments.

Callers 15

newRootMethod · 0.95
skipMethod · 0.45
traverseSegmentsMethod · 0.45
forkPathMethod · 0.45
forkBypassPathMethod · 0.45
popChoiceContextMethod · 0.45
makeLogicalRightMethod · 0.45
makeIfConsequentMethod · 0.45
makeIfAlternateMethod · 0.45
popSwitchContextMethod · 0.45
makeSwitchCaseBodyMethod · 0.45

Calls 2

mergeExtraSegmentsFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected