isAttributeNameSafe() — react Function Reference
Architecture documentation for the isAttributeNameSafe() function in isAttributeNameSafe.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 328a0fd1_037f_e628_5343_b37fc3e7b33b["isAttributeNameSafe()"] 36fcaad4_7e57_5971_700b_f932b635486a["isAttributeNameSafe.js"] 328a0fd1_037f_e628_5343_b37fc3e7b33b -->|defined in| 36fcaad4_7e57_5971_700b_f932b635486a 6ce22a4c_4c21_b911_0098_c100d92df4d3["getValueForAttribute()"] 6ce22a4c_4c21_b911_0098_c100d92df4d3 -->|calls| 328a0fd1_037f_e628_5343_b37fc3e7b33b 384f9fa9_8448_66ce_0422_34f51fe0d9cd["getValueForAttributeOnCustomComponent()"] 384f9fa9_8448_66ce_0422_34f51fe0d9cd -->|calls| 328a0fd1_037f_e628_5343_b37fc3e7b33b b75892dd_dacd_d978_2b97_090839521b0e["setValueForAttribute()"] b75892dd_dacd_d978_2b97_090839521b0e -->|calls| 328a0fd1_037f_e628_5343_b37fc3e7b33b style 328a0fd1_037f_e628_5343_b37fc3e7b33b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-dom-bindings/src/shared/isAttributeNameSafe.js lines 24–40
export default function isAttributeNameSafe(attributeName: string): boolean {
if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
return true;
}
if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
return false;
}
if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
validatedAttributeNameCache[attributeName] = true;
return true;
}
illegalAttributeNameCache[attributeName] = true;
if (__DEV__) {
console.error('Invalid attribute name: `%s`', attributeName);
}
return false;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does isAttributeNameSafe() do?
isAttributeNameSafe() is a function in the react codebase, defined in packages/react-dom-bindings/src/shared/isAttributeNameSafe.js.
Where is isAttributeNameSafe() defined?
isAttributeNameSafe() is defined in packages/react-dom-bindings/src/shared/isAttributeNameSafe.js at line 24.
What calls isAttributeNameSafe()?
isAttributeNameSafe() is called by 3 function(s): getValueForAttribute, getValueForAttributeOnCustomComponent, setValueForAttribute.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free