Skip to content

Commit

Permalink
refactor: transformers tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Sep 28, 2024
1 parent 4a24a9b commit a21172a
Show file tree
Hide file tree
Showing 23 changed files with 810 additions and 611 deletions.
10 changes: 10 additions & 0 deletions src/utils/string.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,13 @@ export function parseCSSRule(rule) {

return { property, value }
}

/**
* Normalize a string by removing extra whitespace.
*
* @param {String} str The string to clean
* @returns {String} The cleaned string
*/
export function cleanString(str) {
return str.replace(/\s+/g, ' ').trim()
}
Loading

0 comments on commit a21172a

Please sign in to comment.