securityos/node_modules/stylelint/lib/utils/rawNodeString.js

21 lines
325 B
JavaScript
Raw Permalink Normal View History

2024-09-06 15:32:35 +00:00
'use strict';
/**
* Stringify PostCSS node including its raw "before" string.
*
* @param {import('postcss').Node} node
*
* @returns {string}
*/
module.exports = function rawNodeString(node) {
let result = '';
if (node.raws.before) {
result += node.raws.before;
}
result += node.toString();
return result;
};