Skip to content

An email was corrected while it shouldn't have #18

Open
@odedstr

Description

@odedstr

An email "[email protected]" was corrected to "[email protected]" even though I added "net.il" to the list of top level domains, and I added it before the default top level domains, so I think it shouldn't have been corrected.

Code:

let topLevelDomains = [...emailSpellChecker.POPULAR_TLDS, 'ir'];
const israel_tld = ['co.il', 'org.il', 'net.il', 'ac.il', 'gov.il', 'muni.il'];
topLevelDomains = [...israel_tld, ...topLevelDomains];

const suggestedEmail = emailSpellChecker.run({
        email: "[email protected]",
        secondLevelDomains: ['yahoo', 'hotmail', 'mail', 'live', 'outlook', 'walla', 'tau', '013', 'netvision',
            'bezeqint', '012', 'zahav', 'ccc'],
        topLevelDomains: topLevelDomains,
        domains: [...emailSpellChecker.POPULAR_DOMAINS, "yahoo.com"]
});
 

Environment:

  • Version: ^1.11.0
  • Platform: Mac
  • Node.js Version: v19.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions