MCPcopy Create free account
hub / github.com/Effect-TS/effect / fromNullishOr

Function fromNullishOr

packages/effect/src/Array.ts:4073–4073  ·  view source on GitHub ↗
(a: A)

Source from the content-addressed store, hash-verified

4071 * @since 4.0.0
4072 */
4073export const fromNullishOr = <A>(a: A): Array<NonNullable<A>> => a == null ? empty() : [a as NonNullable<A>]
4074
4075/**
4076 * Lifts a nullable-returning function into one that returns an array:

Callers 2

liftNullishOrFunction · 0.70
Array.tsFile · 0.70

Calls 1

emptyFunction · 0.70

Tested by

no test coverage detected