UNPKG

@taiga-ui/cdk

Version:

Base library for creating Angular components and applications using Taiga UI principles regarding of actual visual appearance

15 lines (14 loc) 575 B
/** * Obfuscates a string by replacing certain characters with a symbol. * * @param value the input string to obfuscate * @param symbol the symbol for obfuscation * @return the obfuscated string * * The function determines which characters to obfuscate using a regular expression and the string's length: * - 8 or more: show first 2 and last 2 characters * - 4 to 7: show first and last character * - less than 4: obfuscate all characters * - obfuscates only alphanumeric characters */ export declare function tuiObfuscate(value: string, symbol: string): string;