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

tso-data-models

Package Overview
Dependencies
Maintainers
1
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tso-data-models - npm Package Compare versions

Comparing version 1.0.109 to 1.0.110

5

lib/models/data-point/PriceEstimator.d.ts

@@ -5,3 +5,4 @@ import DataPoint from "./DataPoint";

oldestAcceptedRecord: number;
constructor(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number);
offsetAmount: number;
constructor(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number, offsetAmount: number);
getEstimatedPrice(): number;

@@ -11,4 +12,4 @@ }

export declare class PriceEstimatorFactory {
static fromDataPoints(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number): number;
static fromDataPoints(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number, offsetAmount: number): number;
}
//# sourceMappingURL=PriceEstimator.d.ts.map

9

lib/models/data-point/PriceEstimator.js

@@ -5,5 +5,6 @@ "use strict";

var PriceEstimator = /** @class */ (function () {
function PriceEstimator(listOfDataPoints, oldestAcceptedRecord) {
function PriceEstimator(listOfDataPoints, oldestAcceptedRecord, offsetAmount) {
this.listOfDataPoints = listOfDataPoints;
this.oldestAcceptedRecord = oldestAcceptedRecord;
this.offsetAmount = offsetAmount;
}

@@ -27,3 +28,3 @@ PriceEstimator.prototype.getEstimatedPrice = function () {

}
return valueToReturn;
return valueToReturn + this.offsetAmount;
};

@@ -36,4 +37,4 @@ return PriceEstimator;

}
PriceEstimatorFactory.fromDataPoints = function (listOfDataPoints, oldestAcceptedRecord) {
var estimator = new PriceEstimator(listOfDataPoints, oldestAcceptedRecord);
PriceEstimatorFactory.fromDataPoints = function (listOfDataPoints, oldestAcceptedRecord, offsetAmount) {
var estimator = new PriceEstimator(listOfDataPoints, oldestAcceptedRecord, offsetAmount);
return estimator.getEstimatedPrice();

@@ -40,0 +41,0 @@ };

{
"name": "tso-data-models",
"version": "1.0.109",
"version": "1.0.110",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -8,6 +8,8 @@ import DataPoint from "./DataPoint";

oldestAcceptedRecord: number;
offsetAmount: number;
constructor(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number) {
constructor(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number, offsetAmount: number) {
this.listOfDataPoints = listOfDataPoints;
this.oldestAcceptedRecord = oldestAcceptedRecord;
this.offsetAmount = offsetAmount;
}

@@ -32,3 +34,3 @@

}
return valueToReturn;
return valueToReturn + this.offsetAmount;
}

@@ -39,6 +41,6 @@ }

export class PriceEstimatorFactory {
static fromDataPoints(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number): number {
const estimator: PriceEstimator = new PriceEstimator(listOfDataPoints, oldestAcceptedRecord);
static fromDataPoints(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number, offsetAmount: number): number {
const estimator: PriceEstimator = new PriceEstimator(listOfDataPoints, oldestAcceptedRecord, offsetAmount);
return estimator.getEstimatedPrice();
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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