param source param predicate returns export const any = < TSource > ( source , predicate ? ) => { if ( predicate ) { return any2 ( source , predicate ) ; } else { return any1 ( source ) ; } } ; const any1 = < TSource > ( source ) => { for ( const _ of source ) { return true ; } return false ; } ; const any2 = < TSource > ( source , predicate ) => { for ( const item of source ) { if ( predicate ( item ) === true ) { return true ; } } return false ; } ;