packageDocumentation module param value typeparam export const isTruthy = < T > ( value ? ) : value is T => { if ( value ) { if ( typeof value === 'string' ) { return ! ! value . trim ( ) ; } else if ( typeof value === 'number' ) { return ! isNaN ( value ) && value !== Infinity && ( value > 0 || value < 0 ) ; } else if ( Array . isArray ( value ) ) { return value . length > 0 ; } return ! ! value ; } return false ; } ; param value typeparam returns export const isNotNull = < T > ( value ) : value is T => value != null ; /**
 * Regular expression for testing e-mail addresses
 */ export const emailPattern = /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/ ; param email export const isEmail = ( email ? ) => isTruthy ( email ) && emailPattern . test ( email ) ;