This commit is contained in:
2021-11-21 11:18:28 +01:00
parent 7a358eb836
commit 230b10b2a3
9339 changed files with 892519 additions and 62 deletions

18
node_modules/imagemin-svgo/index.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
'use strict';
const isSvg = require('is-svg');
const SVGO = require('svgo');
module.exports = options => buffer => {
options = Object.assign({multipass: true}, options);
if (!isSvg(buffer)) {
return Promise.resolve(buffer);
}
if (Buffer.isBuffer(buffer)) {
buffer = buffer.toString();
}
const svgo = new SVGO(options);
return svgo.optimize(buffer).then(result => Buffer.from(result.data));
};