Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/html_parser/src/mod.ts>DomUtils.findAll

Port of fb55/htmlparser2 for Deno
Latest
function DomUtils.findAll
import { DomUtils } from "https://deno.land/x/html_parser@v0.1.3/src/mod.ts";
const { findAll } = DomUtils;

Search and array of nodes and its children for nodes passing a test function.

Same as find, only with less options, leading to reduced complexity.

Parameters

test: (elem: Element) => boolean

Function to test nodes on.

nodes: Node[]

Array of nodes to search.

Returns

All nodes passing test.