mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			321 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			321 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| // Email address matcher.
 | |
| // eslint-disable-next-line no-useless-escape
 | |
| const matcher = /.+\@.+\..+/;
 | |
| 
 | |
| /**
 | |
|  * Loosely validate an email address.
 | |
|  *
 | |
|  * @param {string} string
 | |
|  * @return {boolean}
 | |
|  */
 | |
| function isEmail(value: string): boolean {
 | |
|     return matcher.test(value);
 | |
| }
 | |
| 
 | |
| /*
 | |
|  * Exports.
 | |
|  */
 | |
| 
 | |
| export default isEmail;
 |