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

email-misspelled

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email-misspelled - npm Package Compare versions

Comparing version 4.0.0-alpha.1 to 4.0.0

2

dist/index.d.ts
import { emailMisspelled } from "./email-misspelled";
export * from "./domains";
export type { DomainList, Result, EmailMisspelled, EmailMisspelledConfig, EmailMisspelledConstructor } from "./typings";
export * from "./typings";
export default emailMisspelled;
/* eslint import/no-default-export: 0 */
import { emailMisspelled } from "./email-misspelled";
export * from "./domains";
export * from "./typings";
export default emailMisspelled;

@@ -85,3 +85,3 @@ {

},
"version": "4.0.0-alpha.1"
"version": "4.0.0"
}

@@ -23,3 +23,3 @@ <h2 align="center">email-misspelled</h2>

![example](https://raw.githubusercontent.com/julien-amblard/email-misspelled/v3/doc/example.gif)
![example](https://raw.githubusercontent.com/julien-amblard/email-misspelled/master/doc/example.gif)

@@ -34,3 +34,2 @@ ## Table of Contents

- [**lengthDiffMax**](#lengthDiffMax)
4. [Typescript support](#types)

@@ -44,3 +43,3 @@ <a id="install"></a>

```bash
npm i email-misspelled --save
npm i email-misspelled
```

@@ -75,18 +74,3 @@

<br />
**Returned object model**
[Result](#TResult)
```ts
Result = {
/** suggested domain */
suggest: string
/** corrected email */
corrected: string
/** number correction needed */
misspelledCount: number
/** original email */
original: string
}[]
```
<br />

@@ -114,3 +98,4 @@

* return :
* [{
* [
* {
* suggest: "random.org",

@@ -120,3 +105,4 @@ * misspelledCount: 1,

* original: "user@randmo.org"
* }]
* }
* ]
**/

@@ -130,12 +116,12 @@ ```

- [Top 100 domains list](#top100)
- [Hotmail](https://github.com/julien-amblard/email-misspelled/blob/v3/src/domains/hotmail.ts)
- [Live](https://github.com/julien-amblard/email-misspelled/blob/v3/src/domains/live.ts)
- [Outlook](https://github.com/julien-amblard/email-misspelled/blob/v3/src/domains/outlook.ts)
- [Microsoft (a combination of hotmail, live and outlook emails)](https://github.com/julien-amblard/email-misspelled/blob/v3/src/domains/microsoft.ts)
- [Yahoo](https://github.com/julien-amblard/email-misspelled/blob/v3/src/domains/yahoo.ts)
- [Aol](https://github.com/julien-amblard/email-misspelled/blob/v3/src/domains/aol.ts)
- [Others domains](https://github.com/julien-amblard/email-misspelled/blob/v3/src/domains/more.ts)
- [All (all previous domains in one list)](https://github.com/julien-amblard/email-misspelled/blob/v3/src/domains/all.ts)
- [Hotmail](https://github.com/julien-amblard/email-misspelled/blob/master/src/domains/hotmail.ts)
- [Live](https://github.com/julien-amblard/email-misspelled/blob/master/src/domains/live.ts)
- [Outlook](https://github.com/julien-amblard/email-misspelled/blob/master/src/domains/outlook.ts)
- [Microsoft (a combination of hotmail, live and outlook emails)](https://github.com/julien-amblard/email-misspelled/blob/master/src/domains/microsoft.ts)
- [Yahoo](https://github.com/julien-amblard/email-misspelled/blob/master/src/domains/yahoo.ts)
- [Aol](https://github.com/julien-amblard/email-misspelled/blob/master/src/domains/aol.ts)
- [Others domains](https://github.com/julien-amblard/email-misspelled/blob/master/src/domains/more.ts)
- [All (all previous domains in one list)](https://github.com/julien-amblard/email-misspelled/blob/master/src/domains/all.ts)
[More details here](https://github.com/julien-amblard/email-misspelled/blob/v3/src/domains/)
[More details here](https://github.com/julien-amblard/email-misspelled/blob/master/src/domains/)

@@ -148,18 +134,2 @@ **examples**

**or**
```ts
import { top100, hotmail, live } from "email-misspelled/domains"
//etc
```
**or**
```ts
import top100 from "email-misspelled/domains/popular"
import hotmail from "email-misspelled/domains/hotmail"
import live from "email-misspelled/domains/live"
//etc
```
Feel free to contribute

@@ -277,57 +247,2 @@

<br />
<a id="types"></a>
<h2 align="center">Typescript support</h2>
You can find Types and Interfaces under the `/typings` folder
<a id="TDomainList"></a>
**`DomainList`**
```ts
import { DomainList } from "email-misspelled/typings"
string[]
```
<a id="TEmailMisspelledConstructor"></a>
**`EmailMisspelledConstructor`**
```ts
import { EmailMisspelledConstructor } from "email-misspelled/typings"
(config: {
lengthDiffMax?: number;
maxMisspelled?: number;
domains: DomainList;
}): EmailMisspelled;
```
<a id="TEmailMisspelled"></a>
**`EmailMisspelled`**
```ts
import { EmailMisspelled } from "email-misspelled/typings"
(email: string): Result[]
```
<a id="TResult"></a>
**`Result`**
```ts
import { Result } from "email-misspelled/typings"
{
suggest: string;
corrected: string;
misspelledCount: number;
original: string;
}
```
---
### Top 100 domains list <a id="top100"></a>

@@ -440,12 +355,1 @@

## TODO
- [x] external domain list
- [x] split domain list into smallest part (only hotmail, only gmail etc)
- [x] Doc
- [x] TU
- [x] TS
- [x] Extend default domain list
- [x] explicit folder for types exports
- [ ] update demo
- [ ] allow returning only first result
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