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

Function containsWith

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

Source from the content-addressed store, hash-verified

2145 * @since 2.0.0
2146 */
2147export const containsWith = <A>(isEquivalent: (self: A, that: A) => boolean): {
2148 (a: A): (self: Option<A>) => boolean
2149 (self: Option<A>, a: A): boolean
2150} => dual(2, (self: Option<A>, a: A): boolean => isNone(self) ? false : isEquivalent(self.value, a))
2151
2152/**
2153 * Checks whether an `Option` contains a value equal to the given one, using default

Callers 1

Option.tsFile · 0.70

Calls 2

isNoneFunction · 0.85
isEquivalentFunction · 0.85

Tested by

no test coverage detected