Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

DomUtils.findOneChild

Finds the first element inside of an array that matches a test function.

function findOneChild(test: (elem: Node) => boolean, nodes: Node[]): Node | undefined;
§
findOneChild(test: (elem: Node) => boolean, nodes: Node[]): Node | undefined
[src]

§Parameters

§
test: (elem: Node) => boolean
[src]

Function to test nodes on.

§
nodes: Node[]
[src]

Array of nodes to search.

§Return Type

§
Node | undefined
[src]

The first node in the array that passes test.