MCPcopy Index your code
hub / github.com/Effect-TS/effect / makeAndPredicate

Function makeAndPredicate

packages/effect/src/internal/matcher.ts:182–197  ·  view source on GitHub ↗
(
  patterns: ReadonlyArray<unknown>
)

Source from the content-addressed store, hash-verified

180}
181
182const makeAndPredicate = (
183 patterns: ReadonlyArray<unknown>
184): Predicate.Predicate<unknown> => {
185 const predicates = patterns.map(makePredicate)
186 const len = predicates.length
187
188 return (u: unknown) => {
189 for (let i = 0; i < len; i++) {
190 if (predicates[i](u) === false) {
191 return false
192 }
193 }
194
195 return true
196 }
197}
198
199/** @internal */
200export const type = <I>(): Matcher<

Callers 1

whenAndFunction · 0.85

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected