nice-is-email
Advanced tools
Comparing version 1.0.2 to 1.0.3
'use strict' | ||
var email = /^([^.](?![a-zA-Z0-9!#$%&'*+\-/=?^_`{|}~]+\.\.)([a-zA-Z0-9!#$%&'*+\-/=?^_`{|}~.]+[^.])|([a-zA-Z0-9]{1,2}))@([A-Za-z0-9-]{1,64}\.){1,10}[a-zA-Z]{2,64}$/ | ||
const email = /^([^.](?![a-zA-Z0-9!#$%&'*+\-/=?^_`{|}~]+\.\.)([a-zA-Z0-9!#$%&'*+\-/=?^_`{|}~.]+[^.])|([a-zA-Z0-9]{1,2}))@([A-Za-z0-9-]{1,64}\.){1,10}[a-zA-Z]{2,64}$/ | ||
@@ -4,0 +4,0 @@ /** |
{ | ||
"name": "nice-is-email", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Checks whether provided parameter looks like a valid e-mail address", | ||
@@ -10,3 +10,3 @@ "main": "lib/index.js", | ||
"view-cover": "istanbul report html && open ./coverage/index.html", | ||
"watch": "nodemon test | tap-difflet", | ||
"dev": "nodemon test | tap-difflet", | ||
"travis": "npm run cover -s && istanbul report lcov && ((cat coverage/lcov.info | coveralls) || exit 0)" | ||
@@ -34,10 +34,15 @@ }, | ||
], | ||
"dependencies": {}, | ||
"dependencies": { | ||
"bubleify": "^0.5.1" | ||
}, | ||
"engines": {}, | ||
"devDependencies": { | ||
"browserify": "^13.1.0", | ||
"bubleify": "^0.5.1", | ||
"istanbul": "^0.4.5", | ||
"standard": "^7.1.2", | ||
"tape": "^4.5.1" | ||
"ducktape": "^1.0.0", | ||
"coveralls": "^2.11.9", | ||
"nodemon": "^1.9.1", | ||
"pre-commit": "^1.1.3", | ||
"istanbul": "^0.4.4", | ||
"standard": "^8.1.0", | ||
"tape": "4.4.0", | ||
"tap-difflet": "0.6.0" | ||
}, | ||
@@ -44,0 +49,0 @@ "browserify": { |
@@ -23,5 +23,5 @@ # nice-is-email | ||
```javascript | ||
var isEmail = require('nice-is-email') | ||
const isEmail = require('nice-is-email') | ||
isEmail('foo@bar.com') // true | ||
isEmail('@bar') // false | ||
``` |
'use strict' | ||
var test = require('tape') | ||
var isEmail = require('../') | ||
const test = require('tape') | ||
const isEmail = require('../') | ||
// The following test cases are based on https://en.wikipedia.org/wiki/Email_address#Syntax | ||
var localParts = [ | ||
const localParts = [ | ||
// ['email', expectedResult] | ||
@@ -36,3 +36,3 @@ [makeChars(64) + '', true], // length | ||
var domainParts = [ | ||
const domainParts = [ | ||
['normal.com', false], // missing `@` | ||
@@ -39,0 +39,0 @@ ['@normal.com', true], // normal |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7158
1
8
+ Addedbubleify@^0.5.1
+ Addedacorn@3.3.0(transitive)
+ Addedacorn-jsx@3.0.1(transitive)
+ Addedacorn-object-spread@1.0.0(transitive)
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedbuble@0.12.5(transitive)
+ Addedbubleify@0.5.1(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedmagic-string@0.14.0(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)
+ Addedvlq@0.2.3(transitive)