Home / Function/ convertCssDirectiveNameToReactCamelCase() — astro Function Reference

convertCssDirectiveNameToReactCamelCase() — astro Function Reference

Architecture documentation for the convertCssDirectiveNameToReactCamelCase() function in parse-inline-css-to-react.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  856b01e6_64d6_a4ce_93be_c7868b61b93d["convertCssDirectiveNameToReactCamelCase()"]
  1a1626cf_4043_99b2_c85a_aca5ce991757["parse-inline-css-to-react.ts"]
  856b01e6_64d6_a4ce_93be_c7868b61b93d -->|defined in| 1a1626cf_4043_99b2_c85a_aca5ce991757
  936aea3f_9f9e_ab18_6d9e_52429dc8e6f1["parseInlineCSSToReactLikeObject()"]
  936aea3f_9f9e_ab18_6d9e_52429dc8e6f1 -->|calls| 856b01e6_64d6_a4ce_93be_c7868b61b93d
  style 856b01e6_64d6_a4ce_93be_c7868b61b93d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/integrations/markdoc/src/html/css/parse-inline-css-to-react.ts lines 18–24

function convertCssDirectiveNameToReactCamelCase(original: string): string {
	// capture group 1 is the character to capitalize, the hyphen is omitted by virtue of being outside the capture group
	const replaced = original.replace(/-([a-z\d])/gi, (_match, char) => {
		return char.toUpperCase();
	});
	return replaced;
}

Domain

Subdomains

Frequently Asked Questions

What does convertCssDirectiveNameToReactCamelCase() do?
convertCssDirectiveNameToReactCamelCase() is a function in the astro codebase, defined in packages/integrations/markdoc/src/html/css/parse-inline-css-to-react.ts.
Where is convertCssDirectiveNameToReactCamelCase() defined?
convertCssDirectiveNameToReactCamelCase() is defined in packages/integrations/markdoc/src/html/css/parse-inline-css-to-react.ts at line 18.
What calls convertCssDirectiveNameToReactCamelCase()?
convertCssDirectiveNameToReactCamelCase() is called by 1 function(s): parseInlineCSSToReactLikeObject.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free