MCPcopy
hub / github.com/ajv-validator/ajv / code

Method code

lib/compile/codegen/index.ts:544–548  ·  view source on GitHub ↗
(c: Block | SafeExpr)

Source from the content-addressed store, hash-verified

542
543 // appends passed SafeExpr to code or executes Block
544 code(c: Block | SafeExpr): CodeGen {
545 if (typeof c == "function") c()
546 else if (c !== nil) this._leafNode(new AnyCode(c))
547 return this
548 }
549
550 // returns code for object literal for the passed argument list of key-value pairs
551 object(...keyValues: [Name | string, SafeExpr | string][]): _Code {

Callers 15

ifMethod · 0.95
_forMethod · 0.95
returnMethod · 0.95
tryMethod · 0.95
blockMethod · 0.95
funcMethod · 0.95
callAsyncRefFunction · 0.80
checkLimitsFunction · 0.80
codeFunction · 0.80
deleteAdditionalFunction · 0.80
loopNFunction · 0.80
validateAdditionalFunction · 0.80

Calls 1

_leafNodeMethod · 0.95

Tested by 1

logFunction · 0.64