MCPcopy Create free account
hub / github.com/nodejs/nodejs.org / cleanClassNames

Function cleanClassNames

packages/ui-components/src/stylelint/utils.mjs:33–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 * @returns {string} The cleaned class names string.
32 */
33export const cleanClassNames = params => {
34 return params
35 .replace(/[\n\r]+/g, '') // Remove new lines
36 .replace(/\s+/g, ' ') // Replace multiple spaces with a single space
37 .trim(); // Trim leading/trailing spaces
38};
39
40/**
41 * Applies the correct indentation to each class name in the string.

Callers 2

index.test.mjsFile · 0.90
indentClassNamesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected