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

legit

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

legit - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

2

example/check_email.js
const legit = require("../src/index.js");
legit("martyn@martyndavies.me")
legit("martyn@notadomainzzzzzzzzz.me")
.then(result => {

@@ -5,0 +5,0 @@ result.isValid ? console.log("Valid!") : console.log("Invalid!");

{
"name": "legit",
"version": "1.0.7",
"version": "1.0.8",
"description": "Check that email addresses are really able to accept emails by pinging the DNS and checking for active MX records.",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -12,4 +12,6 @@ const dns = require('dns');

: resolve({ isValid: false, mxArray: null });
} else if (err.code == 'ENOTFOUND') {
resolve({ isValid: false, mxArray: null, mxRecordSetExists: false});
} else {
reject(new Error(err));
reject(new Error(err.code));
}

@@ -16,0 +18,0 @@ });

@@ -8,3 +8,3 @@ const assert = require('assert');

it('should return true when email is legit', function() {
legit('martyn@nexmo.com')
legit('martyn@vonage.com')
.then(

@@ -11,0 +11,0 @@ result =>

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