Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nice-is-email

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nice-is-email - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

lib/index.js
'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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc