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

13 lines
399 B
JavaScript

'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());
};