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

email-misspelled

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email-misspelled - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const all: DomainList;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.all = void 0;
const aol_1 = require("./aol");
const hotmail_1 = require("./hotmail");
const live_1 = require("./live");
const outlook_1 = require("./outlook");
const more_1 = require("./more");
const top100_1 = require("./top100");
const yahoo_1 = require("./yahoo");
const aol_js_1 = require("./aol.js");
const hotmail_js_1 = require("./hotmail.js");
const live_js_1 = require("./live.js");
const outlook_js_1 = require("./outlook.js");
const more_js_1 = require("./more.js");
const top100_js_1 = require("./top100.js");
const yahoo_js_1 = require("./yahoo.js");
exports.all = [
...new Set([
...top100_1.top100,
...aol_1.aol,
...hotmail_1.hotmail,
...live_1.live,
...outlook_1.outlook,
...more_1.more,
...yahoo_1.yahoo
...top100_js_1.top100,
...aol_js_1.aol,
...hotmail_js_1.hotmail,
...live_js_1.live,
...outlook_js_1.outlook,
...more_js_1.more,
...yahoo_js_1.yahoo
])
];

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const aol: DomainList;

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const hotmail: DomainList;

@@ -1,9 +0,9 @@

export * from "./aol";
export * from "./hotmail";
export * from "./live";
export * from "./outlook";
export * from "./microsoft";
export * from "./more";
export * from "./top100";
export * from "./yahoo";
export * from "./all";
export * from "./aol.js";
export * from "./hotmail.js";
export * from "./live.js";
export * from "./outlook.js";
export * from "./microsoft.js";
export * from "./more.js";
export * from "./top100.js";
export * from "./yahoo.js";
export * from "./all.js";

@@ -17,10 +17,10 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./aol"), exports);
__exportStar(require("./hotmail"), exports);
__exportStar(require("./live"), exports);
__exportStar(require("./outlook"), exports);
__exportStar(require("./microsoft"), exports);
__exportStar(require("./more"), exports);
__exportStar(require("./top100"), exports);
__exportStar(require("./yahoo"), exports);
__exportStar(require("./all"), exports);
__exportStar(require("./aol.js"), exports);
__exportStar(require("./hotmail.js"), exports);
__exportStar(require("./live.js"), exports);
__exportStar(require("./outlook.js"), exports);
__exportStar(require("./microsoft.js"), exports);
__exportStar(require("./more.js"), exports);
__exportStar(require("./top100.js"), exports);
__exportStar(require("./yahoo.js"), exports);
__exportStar(require("./all.js"), exports);

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const live: DomainList;

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const microsoft: DomainList;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.microsoft = void 0;
const hotmail_1 = require("./hotmail");
const live_1 = require("./live");
const outlook_1 = require("./outlook");
exports.microsoft = [...hotmail_1.hotmail, ...live_1.live, ...outlook_1.outlook];
const hotmail_js_1 = require("./hotmail.js");
const live_js_1 = require("./live.js");
const outlook_js_1 = require("./outlook.js");
exports.microsoft = [...hotmail_js_1.hotmail, ...live_js_1.live, ...outlook_js_1.outlook];

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const more: DomainList;

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const outlook: DomainList;

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const top100: DomainList;

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const yahoo: DomainList;

@@ -1,2 +0,2 @@

import type { EmailMisspelledConstructor } from "./typings";
import type { EmailMisspelledConstructor } from "./typings/index.js";
export declare const emailMisspelled: EmailMisspelledConstructor;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.emailMisspelled = void 0;
const contains_one_at_1 = require("./helpers/contains-one-at");
const get_domain_1 = require("./helpers/get-domain");
const string_length_checker_1 = require("./string-length-checker");
const letters_comparison_1 = require("./letters-comparison");
const domain_mapper_1 = require("./helpers/domain-mapper");
const corrector_1 = require("./helpers/corrector");
const sort_1 = require("./helpers/sort");
const contains_one_at_js_1 = require("./helpers/contains-one-at.js");
const get_domain_js_1 = require("./helpers/get-domain.js");
const string_length_checker_js_1 = require("./string-length-checker.js");
const letters_comparison_js_1 = require("./letters-comparison.js");
const domain_mapper_js_1 = require("./helpers/domain-mapper.js");
const corrector_js_1 = require("./helpers/corrector.js");
const sort_js_1 = require("./helpers/sort.js");
const DEFAULT_LENGTH = 3;

@@ -23,16 +23,16 @@ const MAX_MISSPELLED = 2;

return (email) => {
if (!email || !(0, contains_one_at_1.containsOneAt)(email))
if (!email || !(0, contains_one_at_js_1.containsOneAt)(email))
return DEFAULT_RETURN;
const domain = (0, get_domain_1.getDomain)(email);
const domain = (0, get_domain_js_1.getDomain)(email);
if (domains.includes(domain))
return DEFAULT_RETURN;
const sizeFilter = (0, string_length_checker_1.stringLengthChecker)(domain, lengthDiffMax);
const letterFilter = (0, letters_comparison_1.lettersComparison)(domain, maxMisspelled);
const correctorMapper = (0, corrector_1.corrector)(email);
const sizeFilter = (0, string_length_checker_js_1.stringLengthChecker)(domain, lengthDiffMax);
const letterFilter = (0, letters_comparison_js_1.lettersComparison)(domain, maxMisspelled);
const correctorMapper = (0, corrector_js_1.corrector)(email);
const remainsDomains = domains
.filter(sizeFilter)
.map(domain_mapper_1.domainMapper)
.map(domain_mapper_js_1.domainMapper)
.filter(letterFilter)
.map(correctorMapper)
.sort(sort_1.sortByCount);
.sort(sort_js_1.sortByCount);
return remainsDomains;

@@ -39,0 +39,0 @@ };

@@ -1,2 +0,2 @@

import type { Result } from "../typings";
import type { Result } from "../typings/index.js";
export interface Corrector {

@@ -3,0 +3,0 @@ (value: Result): Result;

@@ -1,2 +0,2 @@

import type { Result } from "../typings";
import type { Result } from "../typings/index.js";
export interface DomainMapper {

@@ -3,0 +3,0 @@ (suggest: string): Result;

@@ -1,4 +0,4 @@

import { emailMisspelled } from "./email-misspelled";
export * from "./domains";
export * from "./typings";
import { emailMisspelled } from "./email-misspelled.js";
export * from "./domains/index.js";
export * from "./typings/index.js";
export default emailMisspelled;

@@ -18,5 +18,5 @@ "use strict";

/* eslint import/no-default-export: 0 */
const email_misspelled_1 = require("./email-misspelled");
__exportStar(require("./domains"), exports);
__exportStar(require("./typings"), exports);
exports.default = email_misspelled_1.emailMisspelled;
const email_misspelled_js_1 = require("./email-misspelled.js");
__exportStar(require("./domains/index.js"), exports);
__exportStar(require("./typings/index.js"), exports);
exports.default = email_misspelled_js_1.emailMisspelled;

@@ -1,2 +0,2 @@

import type { Result } from "./typings";
import type { Result } from "./typings/index.js";
export interface LettersComparison {

@@ -3,0 +3,0 @@ (ref: Result): boolean;

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const all: DomainList;

@@ -1,8 +0,8 @@

import { aol } from "./aol";
import { hotmail } from "./hotmail";
import { live } from "./live";
import { outlook } from "./outlook";
import { more } from "./more";
import { top100 } from "./top100";
import { yahoo } from "./yahoo";
import { aol } from "./aol.js";
import { hotmail } from "./hotmail.js";
import { live } from "./live.js";
import { outlook } from "./outlook.js";
import { more } from "./more.js";
import { top100 } from "./top100.js";
import { yahoo } from "./yahoo.js";
export const all = [

@@ -9,0 +9,0 @@ ...new Set([

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const aol: DomainList;

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const hotmail: DomainList;

@@ -1,9 +0,9 @@

export * from "./aol";
export * from "./hotmail";
export * from "./live";
export * from "./outlook";
export * from "./microsoft";
export * from "./more";
export * from "./top100";
export * from "./yahoo";
export * from "./all";
export * from "./aol.js";
export * from "./hotmail.js";
export * from "./live.js";
export * from "./outlook.js";
export * from "./microsoft.js";
export * from "./more.js";
export * from "./top100.js";
export * from "./yahoo.js";
export * from "./all.js";

@@ -1,9 +0,9 @@

export * from "./aol";
export * from "./hotmail";
export * from "./live";
export * from "./outlook";
export * from "./microsoft";
export * from "./more";
export * from "./top100";
export * from "./yahoo";
export * from "./all";
export * from "./aol.js";
export * from "./hotmail.js";
export * from "./live.js";
export * from "./outlook.js";
export * from "./microsoft.js";
export * from "./more.js";
export * from "./top100.js";
export * from "./yahoo.js";
export * from "./all.js";

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const live: DomainList;

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const microsoft: DomainList;

@@ -1,4 +0,4 @@

import { hotmail } from "./hotmail";
import { live } from "./live";
import { outlook } from "./outlook";
import { hotmail } from "./hotmail.js";
import { live } from "./live.js";
import { outlook } from "./outlook.js";
export const microsoft = [...hotmail, ...live, ...outlook];

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const more: DomainList;

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const outlook: DomainList;

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const top100: DomainList;

@@ -1,2 +0,2 @@

import type { DomainList } from "../typings";
import type { DomainList } from "../typings/index.js";
export declare const yahoo: DomainList;

@@ -1,2 +0,2 @@

import type { EmailMisspelledConstructor } from "./typings";
import type { EmailMisspelledConstructor } from "./typings/index.js";
export declare const emailMisspelled: EmailMisspelledConstructor;

@@ -1,8 +0,8 @@

import { containsOneAt } from "./helpers/contains-one-at";
import { getDomain } from "./helpers/get-domain";
import { stringLengthChecker } from "./string-length-checker";
import { lettersComparison } from "./letters-comparison";
import { domainMapper } from "./helpers/domain-mapper";
import { corrector } from "./helpers/corrector";
import { sortByCount } from "./helpers/sort";
import { containsOneAt } from "./helpers/contains-one-at.js";
import { getDomain } from "./helpers/get-domain.js";
import { stringLengthChecker } from "./string-length-checker.js";
import { lettersComparison } from "./letters-comparison.js";
import { domainMapper } from "./helpers/domain-mapper.js";
import { corrector } from "./helpers/corrector.js";
import { sortByCount } from "./helpers/sort.js";
const DEFAULT_LENGTH = 3;

@@ -9,0 +9,0 @@ const MAX_MISSPELLED = 2;

@@ -1,2 +0,2 @@

import type { Result } from "../typings";
import type { Result } from "../typings/index.js";
export interface Corrector {

@@ -3,0 +3,0 @@ (value: Result): Result;

@@ -1,2 +0,2 @@

import type { Result } from "../typings";
import type { Result } from "../typings/index.js";
export interface DomainMapper {

@@ -3,0 +3,0 @@ (suggest: string): Result;

@@ -1,4 +0,4 @@

import { emailMisspelled } from "./email-misspelled";
export * from "./domains";
export * from "./typings";
import { emailMisspelled } from "./email-misspelled.js";
export * from "./domains/index.js";
export * from "./typings/index.js";
export default emailMisspelled;
/* eslint import/no-default-export: 0 */
import { emailMisspelled } from "./email-misspelled";
export * from "./domains";
export * from "./typings";
import { emailMisspelled } from "./email-misspelled.js";
export * from "./domains/index.js";
export * from "./typings/index.js";
export default emailMisspelled;

@@ -1,2 +0,2 @@

import type { Result } from "./typings";
import type { Result } from "./typings/index.js";
export interface LettersComparison {

@@ -3,0 +3,0 @@ (ref: Result): boolean;

@@ -79,2 +79,3 @@ {

"eslint-plugin-import": "^2.29.1",
"eslint-plugin-require-extensions": "^0.1.3",
"eslint-plugin-unicorn": "^51.0.1",

@@ -89,3 +90,3 @@ "husky": "^9.0.11",

},
"version": "4.2.0"
"version": "4.2.1"
}