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

vega-dataflow

Package Overview
Dependencies
Maintainers
2
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-dataflow - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

package.json
{
"name": "vega-dataflow",
"version": "1.2.0",
"version": "1.2.1",
"description": "Vega streaming dataflow graph.",

@@ -5,0 +5,0 @@ "repository": {

@@ -68,5 +68,3 @@ var log = require('vega-logging'),

prototype.values = function(data) {
if (!arguments.length) {
return this._collector ? this._collector.data() : this._data;
}
if (!arguments.length) return this._collector.data();

@@ -73,0 +71,0 @@ // Replace backing data

@@ -40,33 +40,25 @@ var dl = require('datalib'),

prototype.dataValues = function(names) {
var data = this._data, k;
if (!arguments.length) {
names = [];
for (k in data) names.push(k);
}
if (Array.isArray(names)) {
return names.reduce(function(db, name) {
return (db[name] = data[name].values(), db);
}, {});
prototype.signal = function(name, init) {
if (arguments.length === 1) {
var m = this;
return Array.isArray(name) ?
name.map(function(n) { return m._signals[n]; }) :
this._signals[name];
} else {
return data[names].values();
return (this._signals[name] = new Signal(this, name, init));
}
};
function signal(names) {
var m = this;
if (Array.isArray(names)) {
return names.map(function(name) {
return m._signals[name];
});
} else {
return this._signals[names];
}
}
prototype.dataValues = function(names) {
var data = this._data,
n = arguments.length ? names : dl.keys(data),
name, db, i;
prototype.signal = function(name, init) {
if (arguments.length === 1) {
return signal.call(this, name);
if (Array.isArray(n)) {
for (db={}, i=0; i<n.length; ++i) {
db[(name=n[i])] = data[name].values();
}
return db;
} else {
return (this._signals[name] = new Signal(this, name, init));
return data[n].values();
}

@@ -77,14 +69,13 @@ };

prototype.signalValues = function(names) {
if (!arguments.length) {
names = [];
for (var k in this._signals) names.push(k);
}
if (Array.isArray(names)) {
var values = {};
for (var i=0, n=names.length; i<n; ++i) {
values[names[i]] = this._signals[names[i]].value();
var sig = this._signals,
n = arguments.length ? names : dl.keys(sig),
vals, i;
if (Array.isArray(n)) {
for (vals={}, i=0; i<n.length; ++i) {
vals[n[i]] = sig[n[i]].value();
}
return values;
return vals;
} else {
return this._signals[names].value();
return sig[n].value();
}

@@ -118,5 +109,6 @@ };

var pq = new Heap(function(a, b) {
// Topological sort on qrank as rank may change during propagation.
return a.qrank() - b.qrank();
});
// Sort on qrank (queue-rank).
// Rank can change during propagation due to rewiring.
return a._qrank - b._qrank;
});

@@ -123,0 +115,0 @@ if (pulse.stamp) throw Error('Pulse already has a non-zero stamp.');

@@ -13,3 +13,3 @@ function Heap(comparator) {

prototype.clear = function() {
this.nodes = [];
return (this.nodes = [], this);
};

@@ -16,0 +16,0 @@

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