rawNodeString.cjs 483 B

123456789101112131415161718192021222324
  1. // NOTICE: This file is generated by Rollup. To modify it,
  2. // please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
  3. 'use strict';
  4. /**
  5. * Stringify PostCSS node including its raw "before" string.
  6. *
  7. * @param {import('postcss').Node} node
  8. *
  9. * @returns {string}
  10. */
  11. function rawNodeString(node) {
  12. let result = '';
  13. if (node.raws.before) {
  14. result += node.raws.before;
  15. }
  16. result += node.toString();
  17. return result;
  18. }
  19. module.exports = rawNodeString;