@ejazullah/smart-browser-automation
Version:
A smart AI-driven browser automation library and REST API server using MCP (Model Context Protocol) and LangChain for multi-step task execution. Includes both programmatic library usage and HTTP API server for remote automation.
20 lines • 559 B
JavaScript
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