stylelint
Version:
A mighty CSS linter that helps you avoid errors and enforce conventions.
20 lines (15 loc) • 558 B
JavaScript
// NOTICE: This file is generated by Rollup. To modify it,
// please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
;
const functions = require('../reference/functions.cjs');
const HAS_COLOR_FUNCTION = new RegExp(`\\b(?:${[...functions.colorFunctions.values()].join('|')})\\(`, 'i');
/**
* Check if a value contains any standard CSS color function
*
* @param {string} value
* @returns {boolean}
*/
function hasColorFunction(value) {
return HAS_COLOR_FUNCTION.test(value);
}
module.exports = hasColorFunction;