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

stockshark-data-access

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stockshark-data-access - npm Package Compare versions

Comparing version 1.0.51 to 1.0.52

2

package.json
{
"name": "stockshark-data-access",
"version": "1.0.51",
"version": "1.0.52",
"main": "./src/index.js",

@@ -5,0 +5,0 @@ "files": [

@@ -1,2 +0,2 @@

const { InfluxDB, Point } = require("@influxdata/influxdb-client");
const { InfluxDB, Point, } = require("@influxdata/influxdb-client");
const apis = require("@influxdata/influxdb-client-apis");

@@ -55,7 +55,18 @@

async readSequence(id) {
let fluxQuery = `from(bucket: "${config.INFLUXDB_BUCKET}")
|> range(start: 0)
|> filter(fn: (r) => r._measurement == "${id}")`;
async readSequence(id, start, end) {
const _start = start ? start / 1000 : undefined // Convert to seconds
const _end = end ? end / 1000 : undefined // Convert to seconds
let fluxQuery = `from(bucket: "${config.INFLUXDB_BUCKET}")`;
if (_start && _end) {
fluxQuery += ` |> range(start: ${_start}, stop: ${_end})`;
} else if (_start) {
fluxQuery += ` |> range(start: ${_start})`;
} else if (_end) {
fluxQuery += ` |> range(stop: ${_end})`;
}
fluxQuery += ` |> filter(fn: (r) => r._measurement == "${id}")`
const result = [];

@@ -62,0 +73,0 @@ for await (const { values, tableMeta } of this.queryApi.iterateRows(fluxQuery)) {

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