mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Makes it easier to guarantee that our escape behavior stays in line with postcss-selector-parser if their internal implementation ever changes.
9 lines
234 B
JavaScript
9 lines
234 B
JavaScript
import parser from 'postcss-selector-parser'
|
|
import get from 'lodash/get'
|
|
|
|
export default function escapeClassName(className) {
|
|
const node = parser.className()
|
|
node.value = className
|
|
return get(node, 'raws.value', node.value)
|
|
}
|