UNPKG

stylelint

Version:

A mighty CSS linter that helps you avoid errors and enforce conventions.

14 lines (11 loc) 317 B
import { prefixes } from '../reference/prefixes.mjs'; const HAS_PREFIX_REGEX = new RegExp(`(?:${[...prefixes].join('|')})`, 'i'); /** * Check if a string contains any prefix * * @param {string} string * @returns {boolean} */ export default function hasPrefix(string) { return HAS_PREFIX_REGEX.test(string); }