zsvgr
v0.0.8
Published
Zee™ SVG Resizer Powered by SVGO.
Downloads
35
Maintainers
Readme
ZSVGR
ZSVGR - Zee™ SVG Resizer Powered by SVGO
Zee™SVGR is an efficient npm package for resizing and optimizing SVG files using the powerful SVGO (SVG Optimizer). It offers a straightforward solution to adjust SVG dimensions while maintaining high quality and optimizing file size.
Features
- Resize SVGs: Easily resize SVG files to custom dimensions or scale them based on your needs.
- Optimize with SVGO: Utilizes SVGO to minimize file size and improve performance.
- Flexible Configuration: Customize resizing with various options for scaling factors and precision.
- Command-Line Interface: Run resizing operations directly from the command line.
Installation
To install zsvgr, use npm:
npm i zsvgr
API Usage
zsvgr The primary entry point for the package. It is located in lib/zsvgr.js and can be used as an import too.
import zsvgr from 'zsvgr'
const result = zsvgr('svgString', options)
// Options include SVGO's configuration settings with an additional 'customSize' parameter for the scale factor (defaults to 16).
Configuration
You can customize the resizing behavior by passing options directly through the command line or programmatically in your code.
Dependencies
svgo - A powerful SVG optimizer used for optimizing SVG files.
Author
License
MIT License. See the LICENSE file for details.