MCPcopy Create free account
hub / github.com/effect-app/libs / makeFilter

Function makeFilter

repos/effect/packages/effect/src/SchemaAST.ts:2987–2997  ·  view source on GitHub ↗
(
  filter: (input: T, ast: AST, options: ParseOptions) => Schema.FilterOutput,
  annotations?: Schema.Annotations.Filter | undefined,
  aborted: boolean = false
)

Source from the content-addressed store, hash-verified

2985 ) {
2986 return fallback(input, options)
2987 }
2988 if (!(typeof input === "object" && input !== null && !Array.isArray(input))) {
2989 return Effect.fail(new SchemaIssue.InvalidType(ast, input, options))
2990 }
2991 const props = compileMembers()
2992 const record = input as Record<PropertyKey, unknown>
2993 const out: Record<PropertyKey, unknown> = {}
2994 const state: ObjectParserState = { ast, input: record, out, issues: undefined, options }
2995 try {
2996 for (let index = 0; index < props.length; index++) {
2997 const property = props[index]
2998 const name = property.name
2999 const hasKey = hasPropertySignature(record, name)
3000 const value = hasKey ? record[name] : InternalParser.missing

Callers 15

isPatternFunction · 0.85
isTrimmedFunction · 0.85
isStartsWithFunction · 0.85
isEndsWithFunction · 0.85
isIncludesFunction · 0.85
isUppercasedFunction · 0.85
isLowercasedFunction · 0.85
isCapitalizedFunction · 0.85
isUncapitalizedFunction · 0.85
isFiniteFunction · 0.85
makeIsGreaterThanFunction · 0.85

Calls 2

filterFunction · 0.70
makeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…