bfx-api-node-plugin-managed-ob
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -20,10 +20,9 @@ 'use strict' | ||
const raw = chanFilter.prec[0] === 'R' | ||
const nextBook = books[key] | ||
? books[key] | ||
: new OrderBook(original, raw) | ||
const nextBook = books[key] || new OrderBook([], raw) | ||
const isSnapshot = Array.isArray(original[0]) | ||
if (books[key]) { | ||
const entries = !original.length || Array.isArray(original[0]) ? original : [original] | ||
entries.forEach(entry => nextBook.updateWith(entry)) | ||
if (isSnapshot) { | ||
nextBook.updateFromSnapshot(original) | ||
} else { | ||
nextBook.updateWith(original) | ||
} | ||
@@ -30,0 +29,0 @@ |
{ | ||
"name": "bfx-api-node-plugin-managed-ob", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Maintains complete local order books for the Bitfinex Node API", | ||
@@ -5,0 +5,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
8491