MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / getPropertyKey

Function getPropertyKey

src/lib/prettierFormatter.js:444–448  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

442}
443
444function getPropertyKey(node) {
445 if (node?.type === "Identifier") return node.name;
446 if (node?.type === "Literal") return node.value;
447 throw new Error("Unsupported property key");
448}
449
450function evaluateUnaryExpression(node, scope) {
451 const value = evaluateNode(node.argument, scope);

Callers 1

evaluateObjectExpressionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected