UNPKG

406 BJavaScriptView Raw
1'use strict';
2
3const MATH_FUNCTIONS = require('../reference/mathFunctions');
4
5/**
6 * Check whether a node is math function
7 *
8 * @param {import('postcss-value-parser').Node} node postcss-value-parser node
9 * @return {boolean} If `true`, the node is math function
10 */
11module.exports = function isMathFunction(node) {
12 return node.type === 'function' && MATH_FUNCTIONS.includes(node.value.toLowerCase());
13};