Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ts-graphviz

Package Overview
Dependencies
Maintainers
1
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-graphviz - npm Package Compare versions

Comparing version 1.4.1-dev.d42db466f to 1.5.1-dev.43c55b93e

19

lib/adapter/utils/index.js

@@ -0,1 +1,11 @@

function escapeValue(value) {
if (value !== true) {
if (typeof value === 'string' && /\s/g.test(value)) {
return `="${value}"`;
} else {
return `=${value}`;
}
}
return '';
}
function* args(options) {

@@ -7,4 +17,3 @@ const { suppressWarnings = true, format = 'svg', attributes = {}, library = [], y = false, scale } = options;

for (const [key, value] of Object.entries(attributes.graph)) {
if (value === true) yield `-G${key}`;
else yield `-G${key}="${value}"`;
yield `-G${key}${escapeValue(value)}`;
}

@@ -14,4 +23,3 @@ }

for (const [key, value] of Object.entries(attributes.node)) {
if (value === true) yield `-N${key}`;
else yield `-N${key}="${value}"`;
yield `-N${key}${escapeValue(value)}`;
}

@@ -21,4 +29,3 @@ }

for (const [key, value] of Object.entries(attributes.edge)) {
if (value === true) yield `-E${key}`;
else yield `-E${key}="${value}"`;
yield `-E${key}${escapeValue(value)}`;
}

@@ -25,0 +32,0 @@ }

{
"name": "ts-graphviz",
"version": "1.4.1-dev.d42db466f",
"version": "1.5.1-dev.43c55b93e",
"author": "kamiazya <yuki@kamiazya.tech>",

@@ -5,0 +5,0 @@ "description": "Graphviz library for TypeScript.",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc