You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
487 B

4 years ago
  1. 'use strict';
  2. exports.type = 'perItem';
  3. exports.active = true;
  4. exports.description = 'removes XML processing instructions';
  5. /**
  6. * Remove XML Processing Instruction.
  7. *
  8. * @example
  9. * <?xml version="1.0" encoding="utf-8"?>
  10. *
  11. * @param {Object} item current iteration item
  12. * @return {Boolean} if false, item will be filtered out
  13. *
  14. * @author Kir Belevich
  15. */
  16. exports.fn = function(item) {
  17. return !(item.processinginstruction && item.processinginstruction.name === 'xml');
  18. };