1.0.1 • Published 8 months ago

@vrun4750/emailvalidator v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

Email Validator

npm version
A simple and lightweight Node.js package for validating email addresses with regex.


Features

  • Regex-based email validation: Check if an email address is valid.
  • Detailed error messages: Get insights on why validation failed.
  • Customizable rules: Extend the default validation logic.
  • CLI Support: Validate emails directly from the command line.

Installation

Install the package using npm or yarn:

npm install email-validator

Usage

  • Import the validator
const { validateEmail } = require('email-validator');
  • Validate an Email Address

const result = validateEmail('test@example.com');
console.log(result); // { valid: true, error: null }

CLI Usage

You can also use the package directly in your terminal:

npm install -g email-validator
npx email-validator test@example.com
1.0.1

8 months ago

1.0.0

8 months ago