securityos/node_modules/stylelint/lib/utils/isMathFunction.js

14 lines
399 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
'use strict';
const { mathFunctions } = require('../reference/functions');
/**
* Check whether a node is math function
*
* @param {import('postcss-value-parser').Node} node postcss-value-parser node
* @return {boolean} If `true`, the node is math function
*/
module.exports = function isMathFunction(node) {
return node.type === 'function' && mathFunctions.has(node.value.toLowerCase());
};