🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

svg_pathify

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svg_pathify

a node lib to turn svg shape elements into path svg elements

latest
Source
npmnpm
Version
0.0.8
Version published
Weekly downloads
348
83.16%
Maintainers
1
Weekly downloads
 
Created
Source

svgPathify

a node lib to turn svg shape elements into path svg elements

#install

npm install svg_pathify

usage

var svgPathify = require('svg_pathify');

var result = svgPathify('<circle cx="500" cy="500" r="20" fill="red"/>');

/*
<path d="M500,500,m-20,0,a20,20,0,1,0,40,0,a20,20,0,1,0,-40,0,Z" fill="red"/>
*/


result = svgPathify('<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="1000" viewBox="10 10 1000 1000"><circle cx="500" cy="500" r="20" fill="red"/><circle cx="500" cy="500" r="20" fill="red"/></svg>');

/*
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="1000" viewBox="10 10 1000 1000">
  <path d="M500,500,m-20,0,a20,20,0,1,0,40,0,a20,20,0,1,0,-40,0,Z" fill="red"/>
  <path d="M500,500,m-20,0,a20,20,0,1,0,40,0,a20,20,0,1,0,-40,0,Z" fill="red"/>
</svg>
*/

Keywords

svg

FAQs

Package last updated on 09 Jul 2018

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