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

Function pick

packages/tools/ai-codegen/src/Generator.ts:260–261  ·  view source on GitHub ↗
(js: JsonSchema.JsonSchema, predicate: (key: string) => boolean)

Source from the content-addressed store, hash-verified

258const isAnnotation = (key: string): boolean => annotationKeys.has(key) || key.startsWith("x-")
259
260const pick = (js: JsonSchema.JsonSchema, predicate: (key: string) => boolean): JsonSchema.JsonSchema =>
261 Record.filter(js, (_, key) => predicate(key))
262
263/** Object constraints and annotations only; no typed `additionalProperties`. */
264const isPlainObject = (js: JsonSchema.JsonSchema): boolean =>

Callers 4

rewriteNullableFunction · 0.70
mergeBranchFunction · 0.70
mergeChoicesFunction · 0.70
composeFunction · 0.70

Calls 2

predicateFunction · 0.85
filterMethod · 0.45

Tested by

no test coverage detected