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

Function applyIndentation

packages/ui-components/src/stylelint/utils.mjs:47–53  ·  view source on GitHub ↗
(classes, indent)

Source from the content-addressed store, hash-verified

45 * @returns {string} The class names string with applied indentation.
46 */
47export const applyIndentation = (classes, indent) => {
48 return classes
49 .split(' ') // Split into an array of class names
50 .map(className => indent + className) // Add indentation to each class
51 .join('\n') // Join with new lines
52 .trim(); // Remove extra space at the end
53};

Callers 2

index.test.mjsFile · 0.90
indentClassNamesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected