isMathFunction.cjs 565 B

1234567891011121314151617
  1. // NOTICE: This file is generated by Rollup. To modify it,
  2. // please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
  3. 'use strict';
  4. const functions = require('../reference/functions.cjs');
  5. /**
  6. * Check whether a node is math function
  7. *
  8. * @param {import('postcss-value-parser').Node} node postcss-value-parser node
  9. * @returns {boolean} If `true`, the node is math function
  10. */
  11. function isMathFunction(node) {
  12. return node.type === 'function' && functions.mathFunctions.has(node.value.toLowerCase());
  13. }
  14. module.exports = isMathFunction;