@wikimedia/codex
Version:
Codex Design System for Wikimedia
17 lines (16 loc) • 457 B
TypeScript
/**
* Escapes special characters.
*
* @param {string} value Value to be escaped
*
* @return {string}
*/
export declare function regExpEscape(value: string): string;
/**
* Formats title adding highlighted query if it matches.
*
* @param {string} query String to match with
* @param {string} title Full title
* @return [string, string, string]
*/
export declare function splitStringAtMatch(query: string, title: string): [string, string, string];