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

Function isLiteral

src/javascript/source.ts:5–7  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

3export type StringLiteral = (Literal & {value: string}) | TemplateLiteral | BinaryExpression;
4
5export function isLiteral(node: Node): node is Literal {
6 return node.type === "Literal";
7}
8
9export function isTemplateLiteral(node: Node): node is TemplateLiteral {
10 return node.type === "TemplateLiteral";

Callers 2

source-test.tsFile · 0.85
isStringLiteralFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected