UNPKG

dbl-utils

Version:

Utilities for dbl, adba and others projects

15 lines (14 loc) 427 B
/** * Extracts all text nodes from a React element tree. * * @param obj - React node or primitive value to extract text from. * @returns A string containing all text from the node tree. * * @example * ```tsx * const element = <div>Hello <span>World</span></div>; * const text = extractNodeString(element); * console.log(text); // "Hello World" * ``` */ export declare const extractNodeString: (obj: any) => string;