# ssmith-is-valid-email

> Checks to see if email is valid.

Latest version **1.0.3** (published 2018-07-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install ssmith-is-valid-email
pnpm add ssmith-is-valid-email
yarn add ssmith-is-valid-email
bun add ssmith-is-valid-email
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2018-07-12 |
| First published | 2018-07-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | v9.5.0 |
| Dependencies | 0 |
| Unpacked size | 17.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Simeon Smith |
| Maintainers | ssmith-wombatweb |
| Keywords | email, valid, check |

## Links

- npm: https://www.npmjs.com/package/ssmith-is-valid-email
- Repository: https://github.com/ssmith-wombatweb/is-valid-email
- Homepage: https://github.com/ssmith-wombatweb/is-valid-email#readme
- Issues: https://github.com/ssmith-wombatweb/is-valid-email/issues
- npm.io page: https://npm.io/package/ssmith-is-valid-email

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2018-07-12
- 1.0.2 — 2018-07-12
- 1.0.1 — 2018-07-12
- 1.0.0 — 2018-07-12
- 0.18.0 — 2018-07-12
- 0.16.0 — 2018-07-12
- 0.12.0 — 2018-07-11
- 0.11.0 — 2018-07-11
- 0.10.0 — 2018-07-11
- 0.9.0 — 2018-07-11

## README

# ssmith-is-valid-email
## A Robust Tool for Validating Emails

[ ![Codeship Status for ssmith-wombatweb/is-valid-email](https://app.codeship.com/projects/7f59b370-6794-0136-94ad-6607b51510b1/status?branch=master)](https://app.codeship.com/projects/297684)
[![Code Coverage](https://codecov.io/gh/ssmith-wombatweb/is-valid-email/branch/master/graph/badge.svg)](https://codecov.io/gh/ssmith-wombatweb/is-valid-email/branch/master)
[![Dependencies](https://david-dm.org/ssmith-wombatweb/is-valid-email.svg)](https://david-dm.org/ssmith-wombatweb/is-valid-email.svg)
[![npm version](https://badge.fury.io/js/ssmith-is-valid-email.svg)](https://badge.fury.io/js/ssmith-is-valid-email)

[Project Repo](https://github.com/ssmith-wombatweb/is-valid-email)

This script checks the validity of a wide range of email types. It follows most of the rules outlined here: [Email Address - Wikipedia](https://en.wikipedia.org/wiki/Email_address). It was created because of performance issues with RegEx when working with emails in React.

### Author 
Written by Simeon Smith.

[Portfolio](https://www.simeonsmith.me) | [Resume](https://resume.simeonsmith.me) | [Github](https://github.com/ssmith-wombatweb)

## Installation

```
npm i -S ssmith-is-valid-email
```

## Using the Function

This function supports all modern browser including IE9+.

### Importing

#### ES6 JS

```javascript
import isValidEmail from 'ssmith-is-valid-email';
```

#### Common JS Import
```javascript
const isValidEmail = require('ssmith-is-valid-email');
```

### Calling the Function

```javascript
isValidEmail('test@google.com');
// Returns true or false.
```

## Testing

The following emails were tested. It follows most of the rules outlined here: [Email Address - Wikipedia](https://en.wikipedia.org/wiki/Email_address).

### Valid Emails

```
simple@example.com
very.common@example.com
disposable.style.email.with+symbol@example.com
other.email-with-hyphen@example.com
user.name+tag+sorting@example.com
x@example.com
example-indeed@strange-example.com
example@s.example
admin@test.co
" "@example.org
```

### Invalid Emails

```
Abc.example.com
@Abc.example.com
james@google
james@google.c
james richards@google.com
james" richards@google.com
james@cb$.com
A@b@c@example.com
a"b(c)d,e:f;g<h>i[j\\k]l@example.com
just"not"right@example.com
just."not"right@example.com
1234567890123456789012345678901234567890123456789012345678901234+x@example.com
john..doe@example.com
john.doe@example..com
```

### Not Yet Supported

#### Should Be Valid

```
"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com
```

#### Not Useful to Support

```
admin@mailserver1
```

## Performance

This script will run 1000 times on a valid or invalid email in less than 20 milliseconds.

---
_Source: https://npm.io/package/ssmith-is-valid-email · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
