vega-dataflow
Advanced tools
Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "vega-dataflow", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Vega streaming dataflow graph.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -27,2 +27,28 @@ var dl = require('datalib'), | ||
prototype.values = function(type, names, hash) { | ||
var data = (type === Deps.SIGNALS ? this._signals : this._data), | ||
n = (names !== undefined ? names : dl.keys(data)), | ||
vals, i; | ||
if (Array.isArray(n)) { | ||
vals = hash || {}; | ||
for (i=0; i<n.length; ++i) { | ||
vals[n[i]] = data[n[i]].values(); | ||
} | ||
return vals; | ||
} else { | ||
return data[n].values(); | ||
} | ||
}; | ||
// Retain for backwards-compatibility | ||
prototype.dataValues = function(names) { | ||
return this.values(Deps.DATA, names); | ||
}; | ||
// Retain for backwards-compatibility | ||
prototype.signalValues = function(names) { | ||
return this.values(Deps.SIGNALS, names); | ||
}; | ||
prototype.data = function(name, pipeline, facet) { | ||
@@ -52,33 +78,2 @@ var db = this._data; | ||
prototype.dataValues = function(names) { | ||
var data = this._data, | ||
n = arguments.length ? names : dl.keys(data), | ||
name, db, i; | ||
if (Array.isArray(n)) { | ||
for (db={}, i=0; i<n.length; ++i) { | ||
db[(name=n[i])] = data[name].values(); | ||
} | ||
return db; | ||
} else { | ||
return data[n].values(); | ||
} | ||
}; | ||
// TODO: separate into signalValue and signalValues? | ||
prototype.signalValues = function(names) { | ||
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 vals; | ||
} else { | ||
return sig[n].value(); | ||
} | ||
}; | ||
prototype.signalRef = function(ref) { | ||
@@ -85,0 +80,0 @@ if (!Array.isArray(ref)) { |
@@ -26,2 +26,5 @@ var ChangeSet = require('./ChangeSet'), | ||
// Alias to value, for shared API with DataSource | ||
prototype.values = prototype.value; | ||
prototype.verbose = function(v) { | ||
@@ -28,0 +31,0 @@ if (!arguments.length) return this._verbose; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
520677
6970