Small util return adjustments (#1351)

This commit is contained in:
Jaco
2022-01-03 13:56:54 +02:00
committed by GitHub
parent 25644185cc
commit 0859fe4b74
9 changed files with 51 additions and 56 deletions
+3 -3
View File
@@ -21,8 +21,8 @@ import { isUndefined } from '../is/undefined';
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function arrayFilter <T = any> (array: T[], allowNulls = true): T[] {
return array.filter((value) =>
!isUndefined(value) &&
(allowNulls || !isNull(value))
return array.filter((v) =>
!isUndefined(v) &&
(allowNulls || !isNull(v))
);
}