Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

imagemin-svgo

Package Overview
Dependencies
Maintainers
5
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imagemin-svgo - npm Package Compare versions

Comparing version 5.2.2 to 5.2.3

13

index.js
'use strict';
const bufferFrom = require('buffer-from');
const isSvg = require('is-svg');

@@ -18,12 +19,4 @@ const SVGO = require('svgo');

return new Promise((resolve, reject) => {
svgo.optimize(buf, res => {
if (res.error) {
reject(new Error(res.error));
return;
}
resolve(new Buffer(res.data)); // eslint-disable-line unicorn/no-new-buffer
});
});
// TODO: Use `Buffer.from` when targeting Node.js >=6
return svgo.optimize(buf).then(res => bufferFrom(res.data));
};
{
"name": "imagemin-svgo",
"version": "5.2.2",
"description": "SVGO imagemin plugin",
"license": "MIT",
"repository": "imagemin/imagemin-svgo",
"author": {
"name": "Kevin Mårtensson",
"email": "kevinmartensson@gmail.com",
"url": "github.com/kevva"
},
"maintainers": [
{
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
{
"name": "Shinnosuke Watanabe",
"url": "github.com/shinnn"
}
],
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"compress",
"image",
"imageminplugin",
"img",
"minify",
"optimize",
"svg",
"svgo"
],
"dependencies": {
"is-svg": "^2.0.0",
"svgo": "^0.7.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
}
"name": "imagemin-svgo",
"version": "5.2.3",
"description": "SVGO imagemin plugin",
"license": "MIT",
"repository": "imagemin/imagemin-svgo",
"author": {
"name": "Kevin Mårtensson",
"email": "kevinmartensson@gmail.com",
"url": "github.com/kevva"
},
"maintainers": [
{
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
{
"name": "Shinnosuke Watanabe",
"url": "github.com/shinnn"
}
],
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"compress",
"image",
"imageminplugin",
"img",
"minify",
"optimize",
"svg",
"svgo"
],
"dependencies": {
"buffer-from": "^0.1.1",
"is-svg": "^2.0.0",
"svgo": "^1.0.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
}
}

@@ -9,3 +9,3 @@ # imagemin-svgo [![Build Status](https://travis-ci.org/imagemin/imagemin-svgo.svg?branch=master)](https://travis-ci.org/imagemin/imagemin-svgo) [![Build status](https://ci.appveyor.com/api/projects/status/esa7m3u8bcol1mtr/branch/master?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/imagemin-svgo/branch/master)

```
$ npm install --save imagemin-svgo
$ npm install imagemin-svgo
```

@@ -12,0 +12,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc