MCPcopy Create free account
hub / github.com/effect-app/libs / dropUndefined

Function dropUndefined

packages/effect-app/src/utils.ts:123–131  ·  view source on GitHub ↗
(
  input: Dictionary<A | undefined>
)

Source from the content-addressed store, hash-verified

121}
122
123export function dropUndefined<A>(
124 input: Dictionary<A | undefined>
125): Dictionary<A> {
126 const newR = pipe(
127 input,
128 Record.filter((x): x is A => x !== undefined)
129 )
130 return newR
131}
132
133type GetTag<T> = T extends { _tag: infer K } ? K : never
134export const isOfType = <T extends { _tag: string }>(tag: GetTag<T>) => (e: { _tag: string }): e is T => e._tag === tag

Callers 4

reportErrorFunction · 0.90
logErrorFunction · 0.90
reportErrorFunction · 0.90
logErrorFunction · 0.90

Calls 2

pipeFunction · 0.90
filterMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…