MCPcopy Index your code
hub / github.com/nodejs/node / #queryTree

Method #queryTree

deps/npm/lib/commands/query.js:127–139  ·  view source on GitHub ↗
(tree, arg)

Source from the content-addressed store, hash-verified

125
126 // builds a normalized inventory
127 async #queryTree (tree, arg) {
128 const items = await tree.querySelectorAll(arg, this.npm.flatOptions)
129 for (const node of items) {
130 const { location } = node.target
131 if (!location || !this.#seen.has(location)) {
132 const item = new QuerySelectorItem(node)
133 this.#response.push(item)
134 if (location) {
135 this.#seen.add(item.location)
136 }
137 }
138 }
139 }
140}
141
142module.exports = Query

Callers 2

execMethod · 0.95
execWorkspacesMethod · 0.95

Calls 4

hasMethod · 0.65
addMethod · 0.65
querySelectorAllMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected