all files / src/ email.js

100% Statements 7/7
100% Branches 0/0
100% Functions 1/1
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10       15×      
import { regFormat } from './helpers'
 
const REG_EMAIL = /^[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i
 
// Uses "regFormat" internally which is already memoized
let email = regFormat(function() { return REG_EMAIL }, 'email')
 
email.REG_EMAIL = REG_EMAIL
 
export default email