isAfterComment.cjs 520 B

123456789101112131415161718192021
  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. const isSharedLineComment = require('./isSharedLineComment.cjs');
  5. /**
  6. * @param {import('postcss').Node} node
  7. * @returns {boolean}
  8. */
  9. function isAfterComment(node) {
  10. const previousNode = node.prev();
  11. if (!previousNode || previousNode.type !== 'comment') {
  12. return false;
  13. }
  14. return !isSharedLineComment(previousNode);
  15. }
  16. module.exports = isAfterComment;