Norse Polytheistic Mythology
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

micro-email-validator

0.0.1 • Public • Published

micro-email-validator

Transliteration of html5 email validator in Firefox

What is it?

From teh codez:

// Function to validate an email address.
// This is a transliteration of the HTML5 email-validation logic
// inside Firefox.  It splits the username and domain portions,
// translates tham into IDN punycode syntax, then does some very
// basic sanity-checking.

How to use it?

var validate = require('micro-email-validator');

validate('user@example.com'); // returns true

validate('foo@foo@foo'); // returns false

validate('例子@example.com'); // returns true, yay

Please note, however, that these rules are more liberal than you might think:

validate('wow_such@unsatisfy'); // returns true

validate('wat@'); // returns true

Have fun!

License

MPL 2.0

Brought to you by

The fine minds behind Firefox Accounts, and your humble narrator.

install

npm i micro-email-validator

Downloadsweekly downloads

0

version

0.0.1

license

MPL-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability