email-secure
v2.0.4
Published
hide a fragment of the email address
Downloads
260
Maintainers
Readme
email-secure
Installation
- npm install email-secure --save
Usage
//es5
var emailSecure = require('email-secure')
var email = emailSecure.hideEmail("[email protected]")
console.log(email) // j3an*********@gmail.com
//es6
import {hideEmail} from 'email-secure'
let email = hideEmail("[email protected]")
console.log(email) // j3an*********@gmail.com
//if the mail is not valid returns null
console.log(hideEmail("[email protected]")) // null