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

Function getStringValue

scripts/oxlint-plugin-executor/utils.js:68–74  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

66}
67
68export function getStringValue(node) {
69 const expression = unwrapExpression(node);
70 if (expression?.type === "Literal" && typeof expression.value === "string")
71 return expression.value;
72 if (expression?.type === "StringLiteral") return expression.value;
73 return undefined;
74}
75
76export function isIdentifier(node, name) {
77 return node?.type === "Identifier" && (name === undefined || node.name === name);

Callers 2

getTagAccessFunction · 0.90

Calls 1

unwrapExpressionFunction · 0.70

Tested by

no test coverage detected