MCPcopy Index your code
hub / github.com/zenstackhq/zenstack / getStringLiteral

Function getStringLiteral

packages/language/src/utils.ts:76–78  ·  view source on GitHub ↗
(node: AstNode | undefined)

Source from the content-addressed store, hash-verified

74 * Try getting string value from a potential string literal expression
75 */
76export function getStringLiteral(node: AstNode | undefined): string | undefined {
77 return isStringLiteral(node) ? node.value : undefined;
78}
79
80const isoDateTimeRegex = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i;
81

Callers 12

checkDeprecationMethod · 0.90
_checkSchemaMethod · 0.90
validateProviderMethod · 0.90
validateUrlMethod · 0.90
runFunction · 0.90
evaluateUrlFunction · 0.90
getDatasourceFunction · 0.90
typeAssignableFunction · 0.85

Calls 1

isStringLiteralFunction · 0.90

Tested by

no test coverage detected