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

viz.js

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

viz.js - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

2

package.json
{
"name": "viz.js",
"version": "1.6.0",
"version": "1.7.0",
"description": "A hack to put Graphviz on the web.",

@@ -5,0 +5,0 @@ "main": "viz.js",

@@ -19,9 +19,9 @@ # Viz.js

A smaller version of Viz.js can be downloaded from the [releases page](https://github.com/mdaines/viz.js/releases). `viz-lite.js` omits Expat and the NEATO layout plugin.
A smaller version of Viz.js can be downloaded from the [releases page](https://github.com/mdaines/viz.js/releases) and is available in the Bower package. `viz-lite.js` omits Expat and the NEATO layout plugin.
## API
### Viz(src, options={ format="svg", engine="dot", scale })
### Viz(src, options={ format="svg", engine="dot", scale, totalMemory=16777216 })
- `src` is a string representing the graph to render in the DOT language.
- `src` is a string representing the graph to render in the [DOT language](http://www.graphviz.org/content/dot-language).
- `options`

@@ -31,2 +31,3 @@ - `format` sets the output format, and may be one of `"svg"`, `"xdot"`, `"plain"`, `"ps"`, `"json"`, or `"png-image-element"`.

- `scale` sets the scale factor for the `"png-image-element"` format. If this is not specified, `window.devicePixelRatio` will be used if available, and `1` if not.
- `totalMemory` sets the total memory available for the Emscripten module instance. This should be a power of 2. The default of 16MB should be sufficient for most cases — only consider using a larger number if you run into the error "Cannot enlarge memory arrays".

@@ -42,3 +43,3 @@ Parses `src` and renders a graph according to the `options` given. Output is a string, except when using the "png-image-element" format, when it is returned as an instance of HTMLImageElement.

If Graphviz encounters an error, the error message will be thrown as an exception.
If Graphviz encounters an error, Viz will throw an `Error` object with the error message.

@@ -45,0 +46,0 @@ ### Viz.svgXmlToPngImageElement(svgXml[, scale[, callback]])

Sorry, the diff of this file is too big to display

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