MCPcopy
hub / github.com/prettier/prettier / hasLanguageComment

Function hasLanguageComment

src/language-js/embed/utilities.js:76–84  ·  view source on GitHub ↗
({ node, parent }, languageName)

Source from the content-addressed store, hash-verified

74 );
75}
76function hasLanguageComment({ node, parent }, languageName) {
77 return (
78 hasLeadingBlockCommentWithName(node, languageName) ||
79 (isAsConstExpression(parent) &&
80 hasLeadingBlockCommentWithName(parent, languageName)) ||
81 (parent.type === "ExpressionStatement" &&
82 hasLeadingBlockCommentWithName(parent, languageName))
83 );
84}
85
86function isAsConstExpression(node) {
87 return (

Callers 2

isEmbedGraphQLFunction · 0.90
isEmbedHtmlFunction · 0.90

Calls 2

isAsConstExpressionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…