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

Function propertyInData

lib/vocabularies/code.ts:45–53  ·  view source on GitHub ↗
(
  gen: CodeGen,
  data: Name,
  property: Name | string,
  ownProperties?: boolean
)

Source from the content-addressed store, hash-verified

43}
44
45export function propertyInData(
46 gen: CodeGen,
47 data: Name,
48 property: Name | string,
49 ownProperties?: boolean
50): Code {
51 const cond = _`${data}${getProperty(property)} !== undefined`
52 return ownProperties ? _`${cond} && ${isOwnProperty(gen, data, property)}` : cond
53}
54
55export function noPropertyInData(
56 gen: CodeGen,

Callers 5

validatePropertyDepsFunction · 0.90
validateSchemaDepsFunction · 0.90
codeFunction · 0.90
loopUntilMissingFunction · 0.90
validatePropsFunction · 0.90

Calls 3

_Function · 0.90
getPropertyFunction · 0.90
isOwnPropertyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…