stylelint
Version:
A mighty CSS linter that helps you avoid errors and enforce conventions.
20 lines (15 loc) • 499 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 prefixes = require('../reference/prefixes.cjs');
const HAS_PREFIX_REGEX = new RegExp(`(?:${[...prefixes.prefixes].join('|')})`, 'i');
/**
* Check if a string contains any prefix
*
* @param {string} string
* @returns {boolean}
*/
function hasPrefix(string) {
return HAS_PREFIX_REGEX.test(string);
}
module.exports = hasPrefix;