Break down relay utils, replace removeNil with removeUndefined

This commit is contained in:
Jon Staab
2025-11-11 14:05:30 -08:00
parent 4c1c138329
commit e582d46afd
8 changed files with 81 additions and 42 deletions
+1 -1
View File
@@ -776,7 +776,7 @@ export const toIterable = (x: any) => (isIterable(x) ? x : [x])
export const ensurePlural = <T>(x: T | T[]) => (x instanceof Array ? x : [x])
/** Ensures values are not undefined */
export const removeNil = <T>(xs: T[]) => xs.filter(isDefined).map(assertDefined)
export const removeUndefined = <T>(xs: T[]) => xs.filter(isDefined).map(assertDefined)
/** Returns a list of overlapping pairs of elements in xs */
export const overlappingPairs = <T>(xs: T[]): T[][] => {