Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(accumulator, element, index, array) => {
const result = callbackfn(element, index, array);
if (isNotNullOrUndefined(result)) {
accumulator.push(result);
}
return accumulator;
},
[] as U[],