fixemail
v0.0.12
Published
Package for fix address of emails, type fix email joao@gmail .com to [email protected]
Downloads
30
Maintainers
Readme
FixEmail
Install
You can install with npm:
npm install fixemail
You can install with yarn:
yarn add fixemail
FixEmail Syntax
You can fix error in email syntax by user.
You can use:
const fixEmail = require('fixemail');
fixEmail('[email protected]')
// > { email: '[email protected]', valid: true }
fixEmail('emai l@gmail .com')
// > { email: '[email protected]', valid: true }
fixEmail('emai lgmail .com')
// > { email: 'emailgmail.com', valid: false }
import fixEmail from 'fixemail';
fixEmail('[email protected]')
// > { email: '[email protected]', valid: true }
fixEmail('emai l@gmail .com')
// > { email: '[email protected]', valid: true }
fixEmail('emai lgmail .com')
// > { email: 'emailgmail.com', valid: false }
Validate Email
You can validate your email with this package.
Used package email-validator
You can use:
const { validate } = require('fixemail');
validate('[email protected]')
// > true
validate('emai l@gmail .com')
// > false
import { validate } from 'fixemail';
validate('[email protected]')
// > true
validate('emai l@gmail .com')
// > false
Todo Implement
- [ ] Remove alias email, after +
- [ ] Remove accents
- [ ] Verify is domain is valid
- [ ] Remove temp emails