We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce1cc28 commit 9957457Copy full SHA for 9957457
src/isEmail.ts
@@ -1,3 +1,3 @@
1
-export function isEmail(s: string): boolean {
2
- return /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(s)
+export function isEmail(s: string | number): boolean {
+ return /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(s.toString())
3
}
0 commit comments