@stylistic/stylelint-plugin
Version:
A collection of stylistic/formatting Stylelint rules
11 lines (9 loc) • 356 B
JavaScript
const HAS_PSV_INTERPOLATION = /\$\(.+?\)/u
/**
* Checks whether a string has postcss-simple-vars interpolation.
* @param {string} string - The string to check.
* @returns {boolean} True if the string has postcss-simple-vars interpolation, false otherwise.
*/
export function hasPsvInterpolation (string) {
return HAS_PSV_INTERPOLATION.test(string)
}