isStringLiteral() — react Function Reference
Architecture documentation for the isStringLiteral() function in safe-string-coercion.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 201ebe5e_a751_0483_108b_793b8f28b327["isStringLiteral()"] ff8e0a4b_26fd_d20a_1091_80a32dbd865a["safe-string-coercion.js"] 201ebe5e_a751_0483_108b_793b8f28b327 -->|defined in| ff8e0a4b_26fd_d20a_1091_80a32dbd865a 265d5364_66e6_357e_6944_f9bb83cfb31a["isOnlyAddingStrings()"] 265d5364_66e6_357e_6944_f9bb83cfb31a -->|calls| 201ebe5e_a751_0483_108b_793b8f28b327 style 201ebe5e_a751_0483_108b_793b8f28b327 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/eslint-rules/safe-string-coercion.js lines 20–27
function isStringLiteral(node) {
return (
// TaggedTemplateExpressions can return non-strings
(node.type === 'TemplateLiteral' &&
node.parent.type !== 'TaggedTemplateExpression') ||
(node.type === 'Literal' && typeof node.value === 'string')
);
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does isStringLiteral() do?
isStringLiteral() is a function in the react codebase, defined in scripts/eslint-rules/safe-string-coercion.js.
Where is isStringLiteral() defined?
isStringLiteral() is defined in scripts/eslint-rules/safe-string-coercion.js at line 20.
What calls isStringLiteral()?
isStringLiteral() is called by 1 function(s): isOnlyAddingStrings.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free