Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
node-tsguru
Advanced tools
TimeSeries.Guru Node.js client.
npm install node-tsguru
Demo applications are available at:
var tsguru = require("node-tsguru");
tsguru({token: "abc123456789def", databaseID: "abc123456789def"}, function(err, client) {
if (err) throw err;
console.log("connected");
// interact with client like demonstrated below
});
client.insert("sensor01", 123.45, function(err) {
if (err) throw err;
console.log("inserted");
});
client.insert("sensor01", 123.45, 100, function(err) {
if (err) throw err;
console.log("inserted");
});
client.insertSymbol("sensor", "sen01", 123.45, function(err) {
if (err) throw err;
console.log("inserted");
});
client.insertSymbol("sensor", "sen01", 123.45, 10, true, function(err) {
if (err) throw err;
console.log("inserted");
});
client.bulk()
.add("sensor01", 123.45)
.add("sensor02", 234.56)
.add("sensor03", 345.67)
.add("sensor04", 456.78)
.insert(function(err) {
if (err) throw err;
console.log("bulk inserted");
});
var buffer = client.buffer({delay: 250});
buffer.on("error", function(err) {
throw err;
});
buffer.on("flushed", function() {
console.log("flushed");
});
setInterval(function() {
buffer.add("sensor01", 123.45);
}, 100);
buffer()
returns an [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter)
. Emitted events are error
, flush
and flushed
.
var tsguru = require("node-tsguru");
tsguru({token: "abc123456789def", databaseID: "abc123456789def"})
.then(function(client) {
console.log("connected");
// interact with client like demonstrated below
})
.catch(function(err) {
console.log(err);
});
client.insert("sensor01", 123.45)
.then(function(client) {
console.log("inserted");
})
.catch(function(err) {
console.log(err);
});
client.bulk()
.add("sensor01", 123.45)
.add("sensor02", 234.56)
.add("sensor03", 345.67)
.add("sensor04", 456.78)
.insert()
.then(function(client) {
console.log("bulk inserted");
})
.catch(function(err) {
console.log(err);
});
params
: Object
token
: StringdatabaseID
: Stringtimeout
: Number in milliseconds (optional, default: 10000)cb
: Function(err, client) (optional)
err
: Error or undefinedclient
: Client or undefinedreturns a Promise if no cb
was supplied
Client
is an [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter)
.
Insert into a simple time series.
timeseriesName
: Stringvalue1
... valueN
: Number, Boolean or Stringcb
: Function(err) (optional)
err
: Error or undefinedreturns a Promise if no cb
was supplied
Insert into a symbol time series.
timeseriesName
: Stringsymbol
: Stringvalue1
... valueN
: Number, Boolean or Stringcb
: Function(err) (optional)
err
: Error or undefinedreturns a Promise if no cb
was supplied
returns a Bulk
Add to a simple time series.
timeseriesName
: Stringvalue1
... valueN
: Number, Boolean or StringAdd to a symbol time series.
timeseriesName
: Stringsymbol
: Stringvalue1
... valueN
: Number, Boolean or StringInsert takes care about maximal allowed body size. A single insert can be split into multiple POST calls if the HTTP body gets to large.
cb
: Function(err) (optional)
err
: Error or undefinedreturns a Promise if no cb
was supplied
params
: Object
delay
: Number - delay in millisecondsreturns a Buffer
Add to a simple time series.
timeseriesName
: Stringvalue1
... valueN
: Number, Boolean or StringAdd to a symbol time series.
timeseriesName
: Stringsymbol
: Stringvalue1
... valueN
: Number, Boolean or StringFlush the buffer and stop the interval timer. No more adds after close!
cb
: Function(err) (optional)
err
: Error or undefinedreturns a Promise if no cb
was supplied
FAQs
TimeSeries.Guru Node.js client
We found that node-tsguru demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.