0.0.2 • Published 2 years ago

is-email-address v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

is-email-address

Check whether a string is a valid email address or not


Installation

with npm

npm install is-email-address

with yarn

yarn add is-email-address

with pnpm

pnpm install is-email-address

Usage

import the default export from the package:

using ES modules

import isEmailAddress from "is-email-address";

using CommonJs

const isEmailAddress = require("is-email-address");

the import is a function that takes a string as an argument and checks if it's a valid email address

 console.log(isEmailAddress("foo"));
 // false
 
 console.log(isEmailAddress("foo@example.com"));
 // true