Skip to content

Commit

Permalink
Deprecate filterUndefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ryb73 committed Oct 31, 2023
1 parent acfd4a0 commit 09b92b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/collections/filterUndefined.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { isDefined } from "../type-checks";

/**
* @deprecated Use `.filter(isDefined)` instead
*/
export function filterUndefined<T>(arr: (T | null | undefined)[]): T[] {
return arr.filter((v) => isDefined(v)) as T[];
}

0 comments on commit 09b92b4

Please sign in to comment.