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

Function excludesObject

packages/tools/ai-codegen/src/Generator.ts:271–272  ·  view source on GitHub ↗
(js: JsonSchema.JsonSchema)

Source from the content-addressed store, hash-verified

269 Object.keys(js).every((key) => objectKeys.has(key) || isAnnotation(key))
270
271const excludesObject = (js: JsonSchema.JsonSchema): boolean =>
272 Predicate.isString(js.type) ? js.type !== "object" : isStringArray(js.type) && !js.type.includes("object")
273
274const isObjectSchema = (js: JsonSchema.JsonSchema): boolean =>
275 js.type === "object" || (isPlainObject(js) && (js.properties ?? js.required) !== undefined)

Callers 2

mergeBranchFunction · 0.85
toPartFunction · 0.85

Calls 1

isStringArrayFunction · 0.70

Tested by

no test coverage detected