builderman verion 0.1.0, initial commit/release.
This commit is contained in:
20
node_modules/cheerio-select/lib/esm/helpers.js
generated
vendored
Normal file
20
node_modules/cheerio-select/lib/esm/helpers.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { isFilter } from "./positionals.js";
|
||||
export function getDocumentRoot(node) {
|
||||
while (node.parent)
|
||||
node = node.parent;
|
||||
return node;
|
||||
}
|
||||
export function groupSelectors(selectors) {
|
||||
const filteredSelectors = [];
|
||||
const plainSelectors = [];
|
||||
for (const selector of selectors) {
|
||||
if (selector.some(isFilter)) {
|
||||
filteredSelectors.push(selector);
|
||||
}
|
||||
else {
|
||||
plainSelectors.push(selector);
|
||||
}
|
||||
}
|
||||
return [plainSelectors, filteredSelectors];
|
||||
}
|
||||
//# sourceMappingURL=helpers.js.map
|
||||
Reference in New Issue
Block a user