const ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" ; export function guid ( len = 8 ) { let g = "" ; for ( let i = 0 ; i < len ; i ++ ) { g += ALPHABET . charAt ( Math . floor ( Math . random ( ) * ALPHABET . length ) ) ; } return g ; } function isTruthy ( obj ) { return Boolean ( obj ) ; } export function every < T = any > ( arr , predicate = isTruthy ) { for ( let i = 0 , len = arr . length ; i < len ; i ++ ) { if ( ! predicate ( arr [ i ] ) ) { return false ; } } return true ; } export function lc ( str = "" ) { return str . toLowerCase ( ) ; }