icontosvg
v1.1.3
Published
This utility to convert image, icons and graphics into svg
Maintainers
Readme
This project is used to convert image files into svg
You can use below service to convert your images into SVG
Icon to SVG
Dependencies
| Tools | Version |------ | ------- | nodeJS | 14.x LTS
How to run and transform image into SVG
- Clone project
- Run command
npm installto install all dependencies - Run command
npm startto run the project - Open
localhost:<port number>and go to/convertorpage. - Upload file and hit submit to get the svg format.
How to implement package in code
- Install package
npm i icontosvg - Add this line to get promise based instance
var convertor = require("icontosvg"); Note:convertoris promise based and use promise based success and error chaining to get output - example:
var convertor = require("icontosvg")convertor(<VALID_IMAGE_PATH>).then(function(result){console.log("SVG image", result)}).catch(function(err){console.error("Error", err);throw err;})
