Sha256: eafcce5ab47ed81ef6dfa5a4b06d20a4f65297f75c8f5ac22b2b90123a554af1
Contents?: true
Size: 509 Bytes
Versions: 34
Compression:
Stored size: 509 Bytes
Contents
'use strict'; exports.type = 'perItem'; exports.active = true; exports.description = 'removes empty attributes'; /** * Remove attributes with empty values. * * @param {Object} item current iteration item * @return {Boolean} if false, item will be filtered out * * @author Kir Belevich */ exports.fn = function(item) { if (item.elem) { item.eachAttr(function(attr) { if (attr.value === '') { item.removeAttr(attr.name); } }); } };
Version data entries
34 entries across 31 versions & 11 rubygems