MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / hasObjectProperty

Function hasObjectProperty

scripts/oxlint-plugin-executor/utils.js:59–66  ·  view source on GitHub ↗
(node, name)

Source from the content-addressed store, hash-verified

57}
58
59export function hasObjectProperty(node, name) {
60 const expression = unwrapExpression(node);
61 if (expression?.type !== "ObjectExpression") return false;
62 return expression.properties.some((property) => {
63 if (property.type === "SpreadElement") return false;
64 return getPropertyName(property.key) === name;
65 });
66}
67
68export function getStringValue(node) {
69 const expression = unwrapExpression(node);

Callers 1

AwaitExpressionFunction · 0.90

Calls 2

getPropertyNameFunction · 0.85
unwrapExpressionFunction · 0.70

Tested by

no test coverage detected