Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
odedstr opened this issue Jan 6, 2023 · 0 comments
Open

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

odedstr opened this issue Jan 6, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@odedstr
Copy link

odedstr commented Jan 6, 2023

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
@odedstr odedstr added the bug Something isn't working label Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant