import filterValue from "./filterValue"; import isEmpty from "./isEmpty"; import mapDefined from "./mapDefined"; export default ( collection: C, mapper: (collection: C) => R ) => mapDefined( filterValue(collection, (collection) => !isEmpty(collection)), mapper );