Returns a masked email address, which keeps the first character of the local part and the whole domain
Optional
The text to mask
a masked email address, or undefined if the given text is invalid
David Hsing
maskEmail(undefined); // undefinedmaskEmail('user@example.com'); // 'u***@example.com'maskEmail('u@example.com'); // '*@example.com'maskEmail('invalid-email'); // undefined Copy
maskEmail(undefined); // undefinedmaskEmail('user@example.com'); // 'u***@example.com'maskEmail('u@example.com'); // '*@example.com'maskEmail('invalid-email'); // undefined
Returns a masked email address, which keeps the first character of the local part and the whole domain