lucid-ui
Version:
A UI component library from AppNexus.
28 lines • 835 B
TypeScript
/**
* Performs a regex search and returns a partitioning around the matching substring: [pre, match, post]
*
* @param text: string to search
* @param pattern: RegExp patten
* @param length (optional): provide a max length for the matching substring
*
* @return string[]
*/
export declare function partitionText(text: string, pattern: RegExp, length?: number): string[];
/**
* Returns the combined text of all descendant strings
*
* @param node: a component props object
*
* @return string
*/
export declare function getCombinedChildText(node: any): string;
/**
* Perform a regex search on all text found in a component's descendants
*
* @param text
* @param node
*
* @return boolean
*/
export declare function propsSearch(text?: string | null, node?: null): boolean;
//# sourceMappingURL=text-manipulation.d.ts.map