UNPKG

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