1.1.3 • Published 11 months ago
icontosvg v1.1.3
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 install
to install all dependencies - Run command
npm start
to run the project - Open
localhost:<port number>
and go to/convertor
page. - 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:convertor
is 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;
})