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

Function liftOption

packages/effect/src/Array.ts:4044–4047  ·  view source on GitHub ↗
(
  f: (...a: A) => Option.Option<B>
)

Source from the content-addressed store, hash-verified

4042 * @since 2.0.0
4043 */
4044export const liftOption = <A extends Array<unknown>, B>(
4045 f: (...a: A) => Option.Option<B>
4046) =>
4047(...a: A): Array<B> => fromOption(f(...a))
4048
4049/**
4050 * Converts a nullable value to an array: `null`/`undefined` becomes `[]`,

Callers

nothing calls this directly

Calls 1

fFunction · 0.50

Tested by

no test coverage detected