MCPcopy Create free account
hub / github.com/ampproject/amphtml / isObjectProperty

Function isObjectProperty

build-system/compile/json-schema/index.js:178–180  ·  view source on GitHub ↗
(node, name)

Source from the content-addressed store, hash-verified

176 let name = 'validate';
177
178 const isObjectProperty = (node, name) =>
179 (t.isObjectProperty(node) && t.isIdentifier(node.key, {name})) ||
180 t.isStringLiteral(node.key, {value: name});
181
182 const findProperty = (properties, name) =>
183 properties.find((node) => isObjectProperty(node, name));

Callers 1

findPropertyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected