stylelint
Version:
A mighty CSS linter that helps you avoid errors and enforce conventions.
20 lines (16 loc) • 406 B
JavaScript
import { counterIncrementKeywords } from '../reference/keywords.mjs';
/**
* Check value is a custom ident
*
* @param {string} value
*/
export default function isCounterIncrementCustomIdentValue(value) {
const valueLowerCase = value.toLowerCase();
if (
counterIncrementKeywords.has(valueLowerCase) ||
Number.isFinite(Number.parseInt(valueLowerCase, 10))
) {
return false;
}
return true;
}