Small util return adjustments (#1351)
This commit is contained in:
@@ -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))
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user