New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

elkjs

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elkjs - npm Package Compare versions

Comparing version 0.5.1 to 0.6.0-dev-20191012

12

lib/elk-api.js

@@ -71,3 +71,7 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ELK = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){

_ref2$layoutOptions = _ref2.layoutOptions,
layoutOptions = _ref2$layoutOptions === undefined ? this.defaultLayoutOptions : _ref2$layoutOptions;
layoutOptions = _ref2$layoutOptions === undefined ? this.defaultLayoutOptions : _ref2$layoutOptions,
_ref2$logging = _ref2.logging,
logging = _ref2$logging === undefined ? false : _ref2$logging,
_ref2$measureExecutio = _ref2.measureExecutionTime,
measureExecutionTime = _ref2$measureExecutio === undefined ? false : _ref2$measureExecutio;

@@ -80,3 +84,7 @@ if (!graph) {

graph: graph,
options: layoutOptions
layoutOptions: layoutOptions,
options: {
logging: logging,
measureExecutionTime: measureExecutionTime
}
});

@@ -83,0 +91,0 @@ }

10

package.json
{
"name": "elkjs",
"version": "0.5.1",
"version": "0.6.0-dev-20191012",
"author": {
"name": "Ulf Rüegg",
"email": "uru@informatik.uni-kiel.de"
"email": "uruurumail@gmail.com"
},

@@ -36,3 +36,3 @@ "description": "Automatic graph layout based on Sugiyama's algorithm. Specialized for data flow diagrams and ports.",

"build": "npm run gradle && npm run js",
"clean": "rm -r lib"
"clean": "./gradlew clean && rm -r lib"
},

@@ -48,3 +48,7 @@ "devDependencies": {

"webworker-threads": "^0.7.12"
},
"publishConfig": {
"access": "public",
"tag": "next"
}
}

@@ -14,5 +14,10 @@

# Installation
The latest released version:
```bash
npm install elkjs
```
Development version based on ELK's `master` branch.
```bash
npm install elkjs@next
```

@@ -191,4 +196,7 @@ # Releases and Versioning

* `graph` - the graph to be laid out in [ELK JSON](http://www.eclipse.org/elk/documentation/tooldevelopers/graphdatastructure/jsonformat.html). Mandatory!
* `options` - a configuration object. Currently its sole purpose is to pass _global_ layout options.
That is, layout options that are applied to every graph element unless the element specifies the option itself. Optional.
* `options` - a configuration object. Optional.
* `layoutOptions`: its most important purpose is to pass _global_ layout options.
That is, layout options that are applied to every graph element unless the element specifies the option itself.
* `logging`: boolean (_since 0.6.0_). Whether logging information shall be passed back as part of the laid out graph.
* `measureExecutionTime`: boolean (_since 0.6.0_). Whether execution time (in seconds) information shall be passed back as part of the laid out graph.
* returns a `Promise`, which passes either the laid out graph on success or a (hopefully helpful) error on failure.

@@ -209,2 +217,48 @@ * `knownLayoutOptions()`

# Logging and Execution Times
(_Since 0.6.0_)
ELK provides some means to log debug information during layout algorithm execution.
The details can be found in the [_Algorithm Debugging_](https://www.eclipse.org/elk/documentation/algorithmdevelopers/algorithmdebugging.html) section of ELK's documentation.
Not all of it is available in elkjs though, for instance, it is not possible to save intermediate results of the laid out graphs.
Furthermore, while internally execution time is measured in _nanoseconds_ on the Java side,
in elkjs we have to resort to _milliseconds_.
Note that the returned execution times are in seconds.
For small graphs this may often result in execution times being reported as `0`.
See below an example call and the example output.
```js
elk.layout(simpleGraph, {
layoutOptions: {
'algorithm': 'layered'
},
logging: true,
measureExecutionTime: true
})
```
```js
{
"id": "root",
"children": [ ... ],
"edges": [ ... ],
"logging": {
"name": "Recursive Graph Layout",
"executionTime": 0.000096,
"children": [ {
"name": "Layered layout",
"logs": [
"ELK Layered uses the following 17 modules:",
" Slot 01: org.eclipse.elk.alg.layered.p1cycles.GreedyCycleBreaker",
[ ... ]
" Slot 16: org.eclipse.elk.alg.layered.intermediate.ReversedEdgeRestorer"
],
"executionTime": 0.000072,
"children": [ { "name": "Greedy cycle removal", "executionTime": 0.000002 },
[ ... ]
{ "name": "Restoring reversed edges", "executionTime": 0 } ]
} ]
}
}
```
# Building

@@ -211,0 +265,0 @@

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

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

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