aliased-email
v1.1.2
Published
Return an aliased version of the inputted email. By default, adds a timestamp.
Downloads
1
Maintainers
Readme
aliased-email
This lightweight npm package is used to easily generate a valid aliased email addressed. If a custom alias is not included in the function, a timestamp is used that is allowed in email configurations.
Install:
npm i aliased-email
Example:
aliasedEmail("[email protected]", "an alias")
// returns
"[email protected]"
aliasedEmail("[email protected]")
// returns
"[email protected]"
aliasedEmailObject("[email protected]")
// returns
{
alias: "2024-01-01T12.34.56"
aliasedEmail: "[email protected]",
createdAt: "2024-01-01T12:34:56.789Z",
email: "[email protected]",
error: false
}