MCPcopy
hub / github.com/webpack/webpack / enterNode

Function enterNode

lib/util/concatenate.js:58–68  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

56 * @returns {Node[] | undefined} result
57 */
58 const enterNode = (n) => {
59 if (!n) return;
60 const r = n.range;
61 if (r && r[0] <= nr[0] && r[1] >= nr[1]) {
62 const path = getPathInAst(n, node);
63 if (path) {
64 path.push(n);
65 return path;
66 }
67 }
68 };
69
70 if (Array.isArray(ast)) {
71 // sibling ranges are ordered and disjoint; binary search the container

Callers 2

getPathInAstFunction · 0.85

Calls 2

getPathInAstFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected