Socket
Socket
Sign inDemoInstall

isemail

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isemail

Validate an email address according to RFCs 5321, 5322, and others


Version published
Weekly downloads
730K
decreased by-10.92%
Maintainers
3
Weekly downloads
 
Created

What is isemail?

The isemail npm package is a module that allows you to validate email addresses according to the standards and specifications of the Internet Message Format and the DNS (Domain Name System). It is designed to ensure that email addresses are syntactically correct and can be used for sending and receiving emails.

What are isemail's main functionalities?

Email Validation

This feature allows you to validate whether a string is a valid email address. It returns a boolean indicating whether the email is valid or not.

const isEmail = require('isemail');
console.log(isEmail.validate('test@example.com')); // true
console.log(isEmail.validate('invalid-email')); // false

Check DNS

This feature enables DNS checking as part of the validation process. It performs an asynchronous DNS lookup to see if the domain in the email address exists.

const isEmail = require('isemail');
isEmail.validate('test@example.com', { checkDNS: true }, (err, isValid) => {
  console.log(isValid); // true or false based on DNS check
});

Error Level Reporting

This feature provides detailed error level reporting. Instead of a simple boolean, it returns a numeric error level indicating the type of validation error, if any.

const isEmail = require('isemail');
const result = isEmail.validate('test@example.com', { errorLevel: true });
console.log(result); // 0 for valid email or a positive number representing the error level

Other packages similar to isemail

Keywords

FAQs

Package last updated on 18 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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