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

Method walk

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

* Walk over the tree of JS snippets in this node and its children. The * walking function is called once for each snippet of JS and is passed that * snippet and the its original associated source's line/column location. * * @param aFn The traversal function.

(aFn)

Source from the content-addressed store, hash-verified

2150 * @param aFn The traversal function.
2151 */
2152 walk(aFn) {
2153 let chunk;
2154 for (let i = 0, len = this.children.length; i < len; i++) {
2155 chunk = this.children[i];
2156 if (chunk[isSourceNode]) {
2157 chunk.walk(aFn);
2158 } else if (chunk !== "") {
2159 aFn(chunk, { source: this.source,
2160 line: this.line,
2161 column: this.column,
2162 name: this.name });
2163 }
2164 }
2165 }
2166
2167 /**
2168 * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between

Callers 15

toStringMethod · 0.95
toStringWithSourceMapMethod · 0.95
source-map.jsFile · 0.45
replaceSymbolsFunction · 0.45
nodeMethod · 0.45
nodeMethod · 0.45
applySourceMapFunction · 0.45
OnceExitFunction · 0.45
transformValueFunction · 0.45
transformSelectorFunction · 0.45
transformFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected