email-spell-checker
email-spell-checker copied to clipboard
invalid emails like "test" return the same result "undefined" like a valid email
trafficstars
Current Behavior
input: "test" output: "undefined"
input: "[email protected]" output: undefined
input "test@gmai" output: undefined
input "test@gmail" output: {... [email protected]}
Is this behaviour intended?
Expected Behavior
input: "test" output: false
input: "[email protected]" output: true
input "test@gmai" output: false
input "test@gmail" output: {... [email protected]}
Steps to Reproduce the Problem
const suggestion = emailSpellChecker.run({ email })
Environment
- Version: 1.12
- Platform: Mac
- Node.js Version: 20
the problem here is how to know what a valid email address is.
for example: why do you assume "test@gmai" is a false email? according to the email spec, a tld is not required in emails, so it could be a valid email address.