Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

flatten-svg

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.4 to 0.2.0

15

dist/svg-to-paths.js

@@ -54,2 +54,3 @@ "use strict";

case 'g':
case 'a':
for (const child of svgEl.children) {

@@ -77,3 +78,3 @@ yield* walkSvgShapes(child);

}
else if (shape.parentNode) {
if (shape.parentNode) {
return getStroke(shape.parentNode);

@@ -83,2 +84,13 @@ }

}
function getGroupId(shape) {
if (!shape)
return null;
if (shape.id && shape.nodeName.toLowerCase() === 'g') {
return shape.id;
}
if (shape.parentNode) {
return getGroupId(shape.parentNode);
}
return null;
}
function flattenSVG(svg, options = {}) {

@@ -108,2 +120,3 @@ const { maxError = 0.1 } = options;

stroke: getStroke(shape),
groupId: getGroupId(shape)
});

@@ -110,0 +123,0 @@ }

2

package.json
{
"name": "flatten-svg",
"version": "0.1.4",
"version": "0.2.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc