securityos/node_modules/stylelint/lib/utils/isCounterResetCustomIdentVa...

22 lines
413 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
'use strict';
const { counterResetKeywords } = require('../reference/keywords');
/**
* Check value is a custom ident
*
* @param {string} value
*/
module.exports = function isCounterResetCustomIdentValue(value) {
const valueLowerCase = value.toLowerCase();
if (
counterResetKeywords.has(valueLowerCase) ||
Number.isFinite(Number.parseInt(valueLowerCase, 10))
) {
return false;
}
return true;
};