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

Function hasPropFunc

lib/vocabularies/code.ts:33–39  ·  view source on GitHub ↗
(gen: CodeGen)

Source from the content-addressed store, hash-verified

31}
32
33export function hasPropFunc(gen: CodeGen): Name {
34 return gen.scopeValue("func", {
35 // eslint-disable-next-line @typescript-eslint/unbound-method
36 ref: Object.prototype.hasOwnProperty,
37 code: _`Object.prototype.hasOwnProperty`,
38 })
39}
40
41export function isOwnProperty(gen: CodeGen, data: Name, property: Name | string): Code {
42 return _`${hasPropFunc(gen)}.call(${data}, ${property})`

Callers 2

parseSchemaPropertiesFunction · 0.90
isOwnPropertyFunction · 0.85

Calls 2

_Function · 0.90
scopeValueMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…