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

Function has

packages/effect/src/Filter.ts:327–328  ·  view source on GitHub ↗
(key: K)

Source from the content-addressed store, hash-verified

325 */
326export const has =
327 <K>(key: K) => <Input extends { readonly has: (key: K) => boolean }>(input: Input): Result.Result<Input, Input> =>
328 input.has(key) ? Result.succeed(input) : Result.fail(input)
329
330/**
331 * Creates a filter that only passes instances of the given constructor.

Callers 4

intersectionWithFunction · 0.70
differenceWithFunction · 0.70
Record.tsFile · 0.70
isSubrecordByFunction · 0.70

Calls 3

hasMethod · 0.45
succeedMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected