@aurox/ohlcv-helpers
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -31,2 +31,3 @@ import { OHLCVTimeUnit, OHLCVDataItem } from './types'; | ||
getLastDataItem: () => OHLCVDataItem | null; | ||
registerUpdateListener: (listener: () => void) => () => void; | ||
} |
@@ -34,3 +34,3 @@ "use strict"; | ||
this.preHistoryUpdateBuffer = null; | ||
this.emitter.emit('updated'); | ||
this.emitter.emit('update'); | ||
}; | ||
@@ -63,3 +63,3 @@ this.applyUpdate = (update) => { | ||
this.retain(); | ||
this.emitter.emit('updated'); | ||
this.emitter.emit('update'); | ||
}; | ||
@@ -72,2 +72,11 @@ this.getData = () => { | ||
}; | ||
this.registerUpdateListener = (listener) => { | ||
const handler = () => { | ||
listener(); | ||
}; | ||
this.emitter.addListener('update', handler); | ||
return () => { | ||
this.emitter.removeListener('update', handler); | ||
}; | ||
}; | ||
this.timeUnit = options.timeUnit; | ||
@@ -74,0 +83,0 @@ this.retention = options.retention || null; |
{ | ||
"name": "@aurox/ohlcv-helpers", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
15366
348