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