New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@parcel/optimizer-svgo

Package Overview
Dependencies
Maintainers
1
Versions
580
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/optimizer-svgo

  • 2.13.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
246K
decreased by-11.04%
Maintainers
1
Weekly downloads
 
Created

What is @parcel/optimizer-svgo?

@parcel/optimizer-svgo is a Parcel plugin that optimizes SVG files using SVGO (SVG Optimizer). It helps reduce the size of SVG files by removing unnecessary data and optimizing the SVG structure, which can improve load times and performance for web applications.

What are @parcel/optimizer-svgo's main functionalities?

Basic SVG Optimization

This feature allows you to optimize a basic SVG string using the @parcel/optimizer-svgo package. The optimizer removes unnecessary data and optimizes the SVG structure.

const { Optimizer } = require('@parcel/optimizer-svgo');
const optimizer = new Optimizer();
const svg = '<svg>...</svg>';
const optimizedSvg = optimizer.optimize(svg);
console.log(optimizedSvg);

Custom SVGO Configuration

This feature allows you to customize the SVGO configuration by specifying which plugins to use and their settings. This provides more control over the optimization process.

const { Optimizer } = require('@parcel/optimizer-svgo');
const optimizer = new Optimizer({
  plugins: [
    { name: 'removeDoctype', active: true },
    { name: 'removeComments', active: true }
  ]
});
const svg = '<svg>...</svg>';
const optimizedSvg = optimizer.optimize(svg);
console.log(optimizedSvg);

Other packages similar to @parcel/optimizer-svgo

FAQs

Package last updated on 16 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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