export const mapAsync = < T > ( array , fn ) => { return Promise . all ( array . map ( fn ) ) ; } ; export const filterAsync = < T > ( array , fn ) => { return mapAsync ( array , fn ) . then ( ( _arr ) => array . filter ( ( _v , i ) => ! ! _arr [ i ] ) ) ; } ;