
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
I can convert any XML file to JSON
Specially used for converting SVG file to json and vice versa
Params:
/**
* @param {string/file} input : the path to file or string as data
* @param {string} outputFormat: the version of outputed data : svg, json, fontSVG
* @param {string} filename: the name of file the data should be written on
* @param {boolean} unify: Whether the SVG specific tags should be all converted to PATH or not
*/
npm i svgjson
const svgjson = require('svgjson');
Simple Example:
svgjson.convert({input: '<svg>'})
example:
svgjson.convert({input: '<svg>', unify: true})
svgjson.convert({input: 'filepath/string', outputFormat: 'svg', filename: 'example.txt', unify: true})
const options = {input: 'filepath/string', outputFormat: 'svg', filename: 'example.txt', unify: true}
svgjson.parseAbsolute(options) // to parse path commands to absolute
svgjson.parseRelative(options) // to parse path commands to relative
const options = {input: 'filepath/string', outputFormat: 'svg', filename: 'example.txt', unify: true}
svgjson.parsePath(options)
svgjson.direcltParseContour(path)
svgjson.parsePath(options)
svgjson.parseAbsoluteDirectly('M527.62,0c-80.7,61.1-227.63,252.22-190.29,322.65s244.78-6.5,325.48-67.6,115.86-167.72,78.53-238.15S1094.52,574.19,1013.81,635.28Z')
matrix transformer implemented into the 'parseSvgfont'
svgjson.mergeSvgs(svgsData)
<!-- convert the svg file to svgsData -->
svgjson.readFiles([svgfile_address1, svgfile_address2, svgfile_address3, ...])
.then(svgsData => svgjson.mergeSvgs(svgsData)
<!-- the svgjson is supposed to be json format created through convert method -->
svgjson = svgjson.colorHandler(svgjson, '#000')
svgjson = svgjson.sizeHandler(svgjson, '120')
You can use the interface powerd by API: https://api.rexfont.com/svgjson/
Brought to you by REXFONT
FAQs
Convert any SVG file to JSON and font svg
We found that svgjson demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.