import { map } from './map' ; param coll { Array | Object } param predicate { Function } returns export async function filter < T , V > ( input , predicate ) ; export async function filter < T , V > ( input , predicate ) ; export async function filter < T extends Object , V > ( input , predicate ) ; export async function filter < T extends Object , V > ( input , predicate ) ; export async function filter ( input , predicate ) { if ( ! input ) { return [ ] ; } const output = [ ] ; await map ( input , async ( value , key ) => { if ( await predicate ( value , key ) ) { output . push ( value ) ; } } ) ; return output ; }