1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-29 20:21:14 +03:00

added removeDesc plugin

This commit is contained in:
Daniel Wabyick
2014-09-26 10:17:51 -07:00
parent c351ab0de8
commit 06f084d8e7
4 changed files with 35 additions and 1 deletions

22
plugins/removeDesc.js Normal file
View File

@ -0,0 +1,22 @@
'use strict';
exports.type = 'perItem';
exports.active = false;
/**
* Remove <desc>.
* Disabled by default cause it may be used for accessibility.
*
* https://developer.mozilla.org/en-US/docs/Web/SVG/Element/desc
*
* @param {Object} item current iteration item
* @return {Boolean} if false, item will be filtered out
*
* @author Daniel Wabyick
*/
exports.fn = function(item) {
return !item.isElem('desc');
};