Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_updateManagedOB (symbol, data, raw) {
// Snapshot, new OB. Note that we don't protect against duplicates, as they
// could come in on re-sub
if (Array.isArray(data[0])) {
this._orderBooks[symbol] = data
return null
}
// entry, needs to be applied to OB
if (!this._orderBooks[symbol]) {
return new Error(`recv update for unknown OB: ${symbol}`)
}
OrderBook.updateArrayOBWith(this._orderBooks[symbol], data, raw)
return null
}