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

x/html_parser/src/utils/mod.ts>find

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

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

Parameters

test: (elem: Node) => boolean

Function to test nodes on.

nodes: Node[]

Array of nodes to search.

recurse: boolean

Also consider child nodes.

limit: number

Maximum number of nodes to return.

Returns

All nodes passing test.