UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

51 lines (47 loc) 1.64 kB
/** * String utils for Components. * * @internal * @internal */ /** * Escapes special characters in a string used in a regular expression. * * @param regExpString - The input string to escape. * @param except - Special characters to be left unescaped. * @returns A string with special characters escaped, except for those specified in `except`. * @internal * @internal */ export function escapeRegExpString(regExpString: string, except?: string): string; /** * Replaces keys in a template string. * Keys are surrounded by curly braces to be detected * * @param template - The input template string. * @param map - Either a data object to lookup for the key's value * or a function that will be called with the input key. * @returns A string with the keys replaced. * @internal * @internal */ export function replace(template: string, map: object | ((substring: string) => string) | null | undefined): string; /** * Remove all HTML tags from a string, leaving plain text content. * * @param html - The HTML source code from which to remove tags. * @returns A string in which all HTML tags have been removed. * @internal * @internal */ export function stripHTML(html: string): string; /** * Used to determine if the provided key is contained in the template. * * @param template - The template string containing the potential key. * @param key - The key string to look for in the template. * @returns A boolean indicating whether or not the key is contained in the template. * @internal * @internal */ export function templateHasKey(template: string, key: string): boolean;