unist-utils-core
Version:
A collection of commonly used (albeit enhanced) algorithms based on unist and unist-util-xxx
19 lines (18 loc) • 556 B
TypeScript
import { Node } from 'unist';
type selectFn = <T extends Node>(selector: string, tree: Node) => T | null;
/**
* Find first Node that matches selector
*
* @param selector CSS-like selector
* @param tree Unist node or tree of nodes to search
*/
export declare const select: selectFn;
type selectAllFn = <T extends Node>(selector: string, tree: Node) => T[];
/**
* Find all Nodes that match selector
*
* @param selector CSS-like selector
* @param tree Unist node or tree of nodes to search
*/
export declare const selectAll: selectAllFn;
export {};