New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

email-validator-helper

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email-validator-helper

This package provides your application with several types of email validation: syntax, domain, MX server, and much more.

  • 0.0.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

E-mail Validator TS

NodeJS TypeScript NPM

About

This package provides your application with several types of email validation: syntax, domain, MX server, and much more.

✅ Requirements

To use the project, you need to have some packages and starter packages on your computer. See the standard requirements by Node.JS.

  • GIT
  • Node.JS
  • NPM / YARN

⬇️ Installation

Install via NPM:

npm install email-validator-ts

Install via YARN:

yarn add email-validator-ts

🚀 Usage

JavaScript

const { Validator } = require("email-validator-ts");

await Validator.emailVerify("test@email.com"); // true

TypeScript

import { Validator } from "email-validator-ts";

await Validator.emailVerify("test@email.com"); // true

For testing

// Input
console.log("🚀 Started Validator!")
console.log("1) Is the email 'test@mail.com' valid? ", await Validator.emailVerify("test@mail.com"))
console.log("2) Information about the email 'user@gmail.com': ", await Validator.emailAnalyze("user@gmail.com"))
console.log("3) Checks a list (array) of emails. Returns a list of valid and invalid emails: ", await Validator.emailList(["test@mail.com", "user@gmail.com", "mail@0000lol0000.com"]))

// Output
/*

🚀 Started Validator!

Verifying test@mail.com...

1) Is the email 'test@mail.com' valid?  true

Analyzing user@gmail.com...

2) Information about the email 'user@gmail.com':  
{"valid":true,"message":"The email seems valid.","data":{"server":"alt4.gmail-smtp-in.l.google.com","priority":40,"domain":"gmail.com","valid_domain":true,"ipv4":"142.251.9.26","addresses":[{"ip":"142.251.9.27","type":"IPv4"},{"ip":"2a00:1450:4025:c03::1a","type":"IPv6"}],"asn_data":{"142.251.9.26":{"range":"142.251.9.0/24","countryCode":"US","ASN":"15169","registrar":"arin","dateString":"2012-05-24","description":"GOOGLE, US"}}}}

Verifying list to 3 emails ...

3) Checks a list (array) of emails. Returns a list of valid and invalid emails: 
{
  valid: [ 'test@mail.com', 'user@gmail.com' ],
  invalid: [ 'mail@0000lol0000.com' ]
}

*/

🧑🏻‍💻 Author

⚖️ License

MIT License

Copyright (c) 2022 @ARTURMEDEIROS - ARJOS.COM.BR

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Package last updated on 13 Oct 2022

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