MCPcopy Create free account
hub / github.com/Superflows-AI/superflows / isEmail

Function isEmail

lib/utils.ts:455–458  ·  view source on GitHub ↗
(string: string)

Source from the content-addressed store, hash-verified

453}
454
455export function isEmail(string: string): boolean {
456 // Check if string is an email address
457 return /^[\w.-]+@[\w.-]+\.\w{2,}$/g.test(string);
458}
459
460export function isPhoneNumber(string: string): boolean {
461 // Below regex checks for the format of a phone number. It's a little loose since it

Callers 3

isTextWithSubstanceFunction · 0.90
isID.test.tsFile · 0.90
isIDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected