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

email-validation

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email-validation - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

0

index.js
module.exports = require('./lib/email-validation');

1

lib/email-validation.js

@@ -57,2 +57,3 @@ var util = require('util');

}
if(_domain === '') throw util.format("[Error parseing email address: no domain part]", address);
if(hostisip && !require('net').isIP(address.substring(hoststartpos+1,address.length-1))) throw util.format("[Error parsing email address: invalid IP address]");

@@ -59,0 +60,0 @@ if(hostisip && address[address.length-1] != "]") throw util.format("[Error parsing email address: IP address notation must end with a ']']");

4

package.json
{
"name": "email-validation",
"version": "0.1.1",
"version": "0.1.2",
"description": "Email validation that follows the specs.",
"keywords": [],
"keywords": ["email", "address", "validation", "RFC 5322", "RFC 5321", "RFC 3696"],
"author": "Josh Erickson <josh@snoj.us>",

@@ -7,0 +7,0 @@ "repository": { "type": "git", "url": "git://github.com/snoj/email-validation.git" },

@@ -0,0 +0,0 @@ email-validation

@@ -19,2 +19,6 @@ var email = require('../index');

parsebad = email.parse("a@");
assert.equal(parsebad, false);
assert.equal(typeof parsebad['user'], 'undefined');
assert.equal(typeof parsebad['domain'], 'undefined');

@@ -35,2 +39,3 @@ //good

assert.equal(email.valid('one.two@-one-two.com'), false);
assert.equal(email.valid('a@'), false);

@@ -37,0 +42,0 @@ //shamelessly copied from http://en.wikipedia.org/wiki/Email_address

@@ -0,0 +0,0 @@ var email = require('../index');

@@ -0,0 +0,0 @@ console.time("25 emails time ten thousand tries");

Sorry, the diff of this file is not supported yet

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