0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00
penpot/vendor/svgclean/main.js

16 lines
379 B
JavaScript
Raw Normal View History

const plugins = [
{removeDimensions: true},
{removeXMLNS: true},
{removeScriptElement: true},
{removeViewBox: false},
{moveElemsAttrsToGroup: false}
];
const svgc = require("./src/svgclean.js");
const inst = svgc.configure({plugins, multipass: undefined});
exports.optimize = function(data) {
return svgc.optimize(inst, data)
.then((result) => result.data);
};