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

Function fromNullOr

packages/effect/src/Option.ts:841–843  ·  view source on GitHub ↗
(
  a: A
)

Source from the content-addressed store, hash-verified

839 * @since 4.0.0
840 */
841export const fromNullOr = <A>(
842 a: A
843): Option<Exclude<A, null>> => (a === null ? none() : some(a as Exclude<A, null>))
844
845/**
846 * Lifts a function that may return `null` or `undefined` into one that returns

Callers

nothing calls this directly

Calls 2

noneFunction · 0.70
someFunction · 0.70

Tested by

no test coverage detected