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

imagemin-svgo

Package Overview
Dependencies
Maintainers
7
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 8.0.0 to 9.0.0

5

index.js
'use strict';
const isSvg = require('is-svg');
const SVGO = require('svgo');
const {optimize} = require('svgo');

@@ -16,5 +16,4 @@ module.exports = options => async buffer => {

const svgo = new SVGO(options);
const {data} = await svgo.optimize(buffer);
const {data} = optimize(buffer, options);
return Buffer.from(data);
};

8

package.json
{
"name": "imagemin-svgo",
"version": "8.0.0",
"version": "9.0.0",
"description": "SVGO imagemin plugin",
"license": "MIT",
"repository": "imagemin/imagemin-svgo",
"funding": "https://github.com/sindresorhus/imagemin-svgo?sponsor=1",
"funding": {
"url": "https://github.com/sindresorhus/imagemin-svgo?sponsor=1"
},
"engines": {

@@ -28,3 +30,3 @@ "node": ">=10"

"is-svg": "^4.2.1",
"svgo": "^1.3.2"
"svgo": "^2.1.0"
},

@@ -31,0 +33,0 @@ "devDependencies": {

@@ -1,2 +0,2 @@

# imagemin-svgo [![Build Status](https://travis-ci.org/imagemin/imagemin-svgo.svg?branch=master)](https://travis-ci.org/imagemin/imagemin-svgo)
# imagemin-svgo ![GitHub Actions Status](https://github.com/imagemin/imagemin-svgo/workflows/test/badge.svg?branch=master)

@@ -18,10 +18,12 @@ > [SVGO](https://github.com/svg/svgo) imagemin plugin

const imageminSvgo = require('imagemin-svgo');
const {extendDefaultPlugins} = require('svgo');
(async () => {
await imagemin(['images/*.svg'], 'build/images', {
use: [
await imagemin(['images/*.svg'], {
destination: 'build/images',
plugins: [
imageminSvgo({
plugins: [
{removeViewBox: false}
]
plugins: extendDefaultPlugins([
{name: 'removeViewBox', active: false}
])
})

@@ -46,3 +48,3 @@ ]

Pass options to [SVGO](https://github.com/svg/svgo#what-it-can-do).
Pass options to [SVGO](https://github.com/svg/svgo#configuration).

@@ -49,0 +51,0 @@ #### buffer

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