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

email-syntax

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

email-syntax

Email addresses syntax validations library

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

email-syntax

Email addresses syntax validations library

Build Status Coverage Status

Syntax email addresses verification based on RFC5321 and RFC5322.

Installation

Install Email Syntax as an npm module and save it to your package.json file as a dependency:

npm install --save email-syntax

Usage

To use validator, you need to create instance of EmailSyntax class and use its main method validate(). Furthermore, you can use method extractFromQuotes() to get local part of address without quotes.

    const emailSyntax = new EmailSyntax();
    if (emailSyntax.validate('test@some-mail.com')){
        console.log('This address is valid');
    }

Tests

npm test

Keywords

FAQs

Package last updated on 07 Aug 2017

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