rawNodeString.js 325 B

1234567891011121314151617181920
  1. 'use strict';
  2. /**
  3. * Stringify PostCSS node including its raw "before" string.
  4. *
  5. * @param {import('postcss').Node} node
  6. *
  7. * @returns {string}
  8. */
  9. module.exports = function rawNodeString(node) {
  10. let result = '';
  11. if (node.raws.before) {
  12. result += node.raws.before;
  13. }
  14. result += node.toString();
  15. return result;
  16. };