The string to mask. 要掩码的字符串
The masking options. 掩码选项
The masked string. 掩码后的字符串
Indices are UTF-16 code units; a negative end counts from the end of the string.
Non-finite start/end values resolve to 0 and value.length respectively.
索引按 UTF-16 码元计算;end 为负数时从字符串末尾开始计数。
非有限的 start/end 值分别解析为 0 和 value.length。
mask('[email protected]', { start: 1, end: 4 }) // => 'u***@example.com'
Masks a portion of a string, replacing the masked characters with a mask character.
将字符串的指定部分替换为掩码字符,用于隐藏敏感信息。