mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-19 20:45:35 +00:00
12 lines
381 B
JavaScript
12 lines
381 B
JavaScript
import { mathFunctions } from '../reference/functions.mjs';
|
|
|
|
/**
|
|
* Check whether a node is math function
|
|
*
|
|
* @param {import('postcss-value-parser').Node} node postcss-value-parser node
|
|
* @returns {boolean} If `true`, the node is math function
|
|
*/
|
|
export default function isMathFunction(node) {
|
|
return node.type === 'function' && mathFunctions.has(node.value.toLowerCase());
|
|
}
|