MCPcopy Create free account
hub / github.com/observablehq/framework / maybeStringLiteralValue

Function maybeStringLiteralValue

test/javascript/source-test.ts:65–67  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

63});
64
65function maybeStringLiteralValue(node: Node): string | undefined {
66 return isStringLiteral(node) ? getStringLiteralValue(node) : undefined;
67}
68
69function parseExpression(input: string): Expression {
70 return Parser.parseExpressionAt(input, 0, {ecmaVersion: 13, sourceType: "module"});

Callers 1

source-test.tsFile · 0.85

Calls 2

isStringLiteralFunction · 0.85
getStringLiteralValueFunction · 0.85

Tested by

no test coverage detected