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

Function containsWith

packages/effect/src/Option.ts:2078–2081  ·  view source on GitHub ↗
(isEquivalent: (self: A, that: A) => boolean)

Source from the content-addressed store, hash-verified

2076 * @since 2.0.0
2077 */
2078export const containsWith = <A>(isEquivalent: (self: A, that: A) => boolean): {
2079 (a: A): (self: Option<A>) => boolean
2080 (self: Option<A>, a: A): boolean
2081} => dual(2, (self: Option<A>, a: A): boolean => isNone(self) ? false : isEquivalent(self.value, a))
2082
2083/**
2084 * Checks whether an `Option` contains a value equal to the given one, using default

Callers 1

Option.tsFile · 0.70

Calls 1

isNoneFunction · 0.85

Tested by

no test coverage detected