mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-18 03:55:32 +00:00
19 lines
307 B
JavaScript
19 lines
307 B
JavaScript
/**
|
|
* Stringify PostCSS node including its raw "before" string.
|
|
*
|
|
* @param {import('postcss').Node} node
|
|
*
|
|
* @returns {string}
|
|
*/
|
|
export default function rawNodeString(node) {
|
|
let result = '';
|
|
|
|
if (node.raws.before) {
|
|
result += node.raws.before;
|
|
}
|
|
|
|
result += node.toString();
|
|
|
|
return result;
|
|
}
|