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

Function liftNullishOr

packages/effect/src/Option.ts:880–883  ·  view source on GitHub ↗
(
  f: (...a: A) => B
)

Source from the content-addressed store, hash-verified

878 * @since 4.0.0
879 */
880export const liftNullishOr = <A extends ReadonlyArray<unknown>, B>(
881 f: (...a: A) => B
882): (...a: A) => Option<NonNullable<B>> =>
883(...a) => fromNullishOr(f(...a))
884
885/**
886 * Extracts the value from a `Some`, or returns `null` for `None`.

Callers

nothing calls this directly

Calls 2

fromNullishOrFunction · 0.70
fFunction · 0.50

Tested by

no test coverage detected