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

imagemin-svgo

Package Overview
Dependencies
Maintainers
1
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 0.1.1 to 1.0.0

23

index.js

@@ -14,16 +14,17 @@ 'use strict';

module.exports = function (opts) {
opts = opts || {};
opts = opts || {};
return function (file, imagemin, cb) {
if (!isSvg(file.contents)) {
return cb();
}
return function (file, imagemin, cb) {
if (!isSvg(file.contents)) {
cb();
return;
}
var svgo = new SVGO(opts);
var svgo = new SVGO({ plugins: opts.plugins || [] });
svgo.optimize(file.contents.toString('utf8'), function (res) {
file.contents = new Buffer(res.data);
cb();
});
};
svgo.optimize(file.contents.toString('utf8'), function (res) {
file.contents = new Buffer(res.data);
cb();
});
};
};
{
"name": "imagemin-svgo",
"version": "0.1.1",
"version": "1.0.0",
"description": "svgo image-min plugin",
"license": "MIT",
"repository": "kevva/imagemin-svgo",
"repository": "imagemin/imagemin-svgo",
"author": {

@@ -16,3 +16,3 @@ "name": "Kevin Mårtensson",

"scripts": {
"test": "mocha --reporter list"
"test": "node test/test.js"
},

@@ -32,9 +32,9 @@ "files": [

"dependencies": {
"is-svg": "^0.1.1",
"svgo": "^0.4.4"
"is-svg": "^1.0.0",
"svgo": "^0.4.5"
},
"devDependencies": {
"image-min": "^0.4.2",
"mocha": "^1.18.2"
"ava": "0.0.4",
"imagemin": "^1.0.2"
}
}

@@ -1,11 +0,13 @@

# imagemin-svgo [![Build Status](https://travis-ci.org/kevva/imagemin-svgo.svg?branch=master)](https://travis-ci.org/kevva/imagemin-svgo)
# imagemin-svgo [![Build Status](https://travis-ci.org/imagemin/imagemin-svgo.svg?branch=master)](https://travis-ci.org/imagemin/imagemin-svgo)
> svgo image-min plugin
## Install
```bash
```sh
$ npm install --save imagemin-svgo
```
## Usage

@@ -25,2 +27,3 @@

## Options

@@ -31,3 +34,3 @@

Type: `Array`
Default: `undefined`
Default: `[]`

@@ -41,4 +44,5 @@ Customize which SVGO [plugins](https://github.com/svg/svgo/tree/master/plugins) to use.

## License
MIT © [Kevin Mårtensson](https://github.com/kevva)
MIT © [imagemin](https://github.com/imagemin)
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