epiphany/node_modules/stylelint/lib/utils/hasPrefix.js
2023-12-09 22:48:07 -08:00

15 lines
336 B
JavaScript

'use strict';
const { prefixes } = require('../reference/prefixes');
const HAS_PREFIX_REGEX = new RegExp(`(?:${[...prefixes].join('|')})`, 'i');
/**
* Check if a string contains any prefix
*
* @param {string} string
* @returns {boolean}
*/
module.exports = function hasPrefix(string) {
return HAS_PREFIX_REGEX.test(string);
};