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

Function fromUndefinedOr

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

Source from the content-addressed store, hash-verified

805 * @since 4.0.0
806 */
807export const fromUndefinedOr = <A>(
808 a: A
809): Option<Exclude<A, undefined>> => (a === undefined ? none() : some(a as Exclude<A, undefined>))
810
811/**
812 * Converts a possibly `null` value into an `Option`, leaving `undefined`

Callers

nothing calls this directly

Calls 2

noneFunction · 0.70
someFunction · 0.70

Tested by

no test coverage detected