param { number } time returns { Promise < any > } export function timeout ( time ) { return new Promise ( ( resolve ) => { setTimeout ( resolve , time ) ; } ) ; } export function validateEmail ( email ) { const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ ; return re . test ( email . toLowerCase ( ) ) ; }