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

tardis-dev

Package Overview
Dependencies
Maintainers
1
Versions
272
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tardis-dev - npm Package Compare versions

Comparing version 12.2.0 to 12.2.1

27

dist/computable/computable.js

@@ -16,8 +16,9 @@ "use strict";

const id = normalizedMessage.name !== undefined ? `${normalizedMessage.symbol}:${normalizedMessage.name}` : normalizedMessage.symbol;
const computables = factory.getOrCreate(normalizedMessage.exchange, id);
const computablesMap = factory.getOrCreate(normalizedMessage.exchange, id);
const computables = computablesMap[normalizedMessage.type];
if (!computables)
continue;
for (const computable of computables) {
if (computable.sourceDataTypes.includes(normalizedMessage.type)) {
for (const computedMessage of computable.compute(normalizedMessage)) {
yield computedMessage;
}
for (const computedMessage of computable.compute(normalizedMessage)) {
yield computedMessage;
}

@@ -46,3 +47,3 @@ }

if (this._computables[exchange][id] === undefined) {
this._computables[exchange][id] = this._computablesFactories.map((c) => c());
this._computables[exchange][id] = createComputablesMap(this._computablesFactories.map((c) => c()));
}

@@ -55,2 +56,16 @@ return this._computables[exchange][id];

}
function createComputablesMap(computables) {
return computables.reduce((acc, computable) => {
computable.sourceDataTypes.forEach((dataType) => {
const existing = acc[dataType];
if (!existing) {
acc[dataType] = [computable];
}
else {
acc[dataType].push(computable);
}
});
return acc;
}, {});
}
//# sourceMappingURL=computable.js.map
{
"name": "tardis-dev",
"version": "12.2.0",
"version": "12.2.1",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=12"

@@ -29,9 +29,9 @@ import { Disconnect, Exchange, NormalizedData } from '../types'

const computables = factory.getOrCreate(normalizedMessage.exchange, id)
const computablesMap = factory.getOrCreate(normalizedMessage.exchange, id)
const computables = computablesMap[normalizedMessage.type]
if (!computables) continue
for (const computable of computables) {
if (computable.sourceDataTypes.includes(normalizedMessage.type)) {
for (const computedMessage of computable.compute(normalizedMessage)) {
yield computedMessage
}
for (const computedMessage of computable.compute(normalizedMessage)) {
yield computedMessage
}

@@ -58,3 +58,3 @@ }

[ex in Exchange]?: {
[key: string]: Computable<any>[]
[key: string]: { [dataType: string]: Computable<any>[] }
}

@@ -71,3 +71,3 @@ } = {}

if (this._computables[exchange]![id] === undefined) {
this._computables[exchange]![id] = this._computablesFactories.map((c) => c())
this._computables[exchange]![id] = createComputablesMap(this._computablesFactories.map((c) => c()))
}

@@ -82,1 +82,15 @@

}
function createComputablesMap(computables: Computable<any>[]) {
return computables.reduce((acc, computable) => {
computable.sourceDataTypes.forEach((dataType) => {
const existing = acc[dataType]
if (!existing) {
acc[dataType] = [computable]
} else {
acc[dataType].push(computable)
}
})
return acc
}, {} as { [dataType: string]: Computable<any>[] })
}

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