You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With around 50% of top level domains being .com and only around 1% of TLDs being .co it seems like .com should be preferred over .co in a majority of cases especially in 3 letter domain names beginning with c.
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, and I know how to start.
Yes, I have the time, but I don't know how to start. I would need guidance.
No, I don't have the time, although I believe I could do it if I had the time...
No, I don't have the time and I wouldn't even know how to start.
The text was updated successfully, but these errors were encountered:
PatrickEGorman
changed the title
.com domain should take priority over .co
.com domain should take priority over .co in 3 letter domains beginning in 'c'
Nov 17, 2023
PatrickEGorman
changed the title
.com domain should take priority over .co in 3 letter domains beginning in 'c'
.com should take priority over .co in 3 letter domains beginning in 'c'
Nov 17, 2023
@PatrickEGorman I was able to work around this by using a custom distance function with a special case for .com:
importmailcheckfrom'@zootools/email-spell-checker'importdistancefrom'@zootools/email-spell-checker/dist/lib/helpers/sift3Distance'constmailcheckDistance=(domain: string,knownDomain: string)=>{letdist=distance(domain,knownDomain)// force prioritize .com matches over .co and .caif(knownDomain==='com')dist-=0.75returndist}constsuggestion=mailcheck.run({ email,distanceFunction: mailcheckDistance})
Feature Request
Is your feature request related to a problem? Please describe.
There are some cases where .co is the preferred suggestion when .com seems to be a much more likely candidate of what the user meant to input.
Ex: [email protected] corrects to [email protected] or [email protected] (right hand shifted one key left on a querty keyboard) also corrects to [email protected] even though [email protected] seems like a much more probable candidate on what the user meant to input.
Describe the solution you'd like
With around 50% of top level domains being
.com
and only around 1% of TLDs being.co
it seems like .com should be preferred over .co in a majority of cases especially in 3 letter domain names beginning withc
.Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: