This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
2020-11-01 22:46:04 +00:00

14 lines
406 B
JavaScript

'use strict';
const MATH_FUNCTIONS = require('../reference/mathFunctions');
/**
* 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' && MATH_FUNCTIONS.includes(node.value.toLowerCase());
};