(tree, arg)
| 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 | |
| 142 | module.exports = Query |
no test coverage detected