export function enumerate < T > ( arr ) { return arr . map ( ( v , i ) => [ i , v ] ) ; } export async function sleep ( ms ) { await new Promise ( ( r ) => setTimeout ( r , ms ) ) ; } export function divide ( from , split ) { const arr = from . split ( split ) ; return [ arr [ 0 ] , arr . slice ( 1 ) . join ( split ) ] ; }