Files
szjs/node_modules/stylelint/lib/utils/isStandardSyntaxFunction.cjs
2025-03-07 22:27:18 +08:00

35 lines
717 B
JavaScript

// NOTICE: This file is generated by Rollup. To modify it,
// please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
'use strict';
/**
* Check whether a function is standard
*
* @param {import('postcss-value-parser').Node} node
* @returns {boolean}
*/
function isStandardSyntaxFunction(node) {
// Function nodes without names are things in parentheses like Sass lists
if (!node.value) {
return false;
}
if (node.value.startsWith('#{')) {
return false;
}
// CSS-in-JS interpolation
if (node.value.startsWith('${')) {
return false;
}
// CSS-in-JS syntax
if (node.value.startsWith('`')) {
return false;
}
return true;
}
module.exports = isStandardSyntaxFunction;