bfx-api-node-models
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -13,14 +13,14 @@ 'use strict' | ||
const { | ||
symbol, frr, bid, bidPeriod, bidSize, ask, askPeriod, askSize, | ||
frr, bid, bidPeriod, bidSize, ask, askPeriod, askSize, | ||
dailyChange, dailyChangePerc, lastPrice, volume, high, low | ||
} = this | ||
return [symbol, [ | ||
return [ | ||
frr, bid, bidPeriod, bidSize, ask, askPeriod, askSize, dailyChange, | ||
dailyChangePerc, lastPrice, volume, high, low | ||
]] | ||
] | ||
} | ||
static unserialize (arr) { | ||
const [ symbol, data ] = arr | ||
const [ data ] = arr | ||
const [ | ||
@@ -31,6 +31,5 @@ frr, bid, bidPeriod, bidSize, ask, askPeriod, askSize, dailyChange, | ||
? data | ||
: [...arr].splice(1) | ||
: [...arr].splice(0) | ||
return { | ||
symbol, | ||
frr, | ||
@@ -37,0 +36,0 @@ bid, |
@@ -13,14 +13,14 @@ 'use strict' | ||
const { | ||
symbol, bid, bidSize, ask, askSize, dailyChange, dailyChangePerc, | ||
bid, bidSize, ask, askSize, dailyChange, dailyChangePerc, | ||
lastPrice, volume, high, low | ||
} = this | ||
return [symbol, [ | ||
return [ | ||
bid, bidSize, ask, askSize, dailyChange, dailyChangePerc, lastPrice, | ||
volume, high, low | ||
]] | ||
] | ||
} | ||
static unserialize (arr) { | ||
const [ symbol, data ] = arr | ||
const [ data ] = arr | ||
const [ | ||
@@ -31,6 +31,5 @@ bid, bidSize, ask, askSize, dailyChange, dailyChangePerc, lastPrice, | ||
? data | ||
: [...arr].splice(1) | ||
: [...arr].splice(0) | ||
return { | ||
symbol, | ||
bid, | ||
@@ -37,0 +36,0 @@ bidSize, |
{ | ||
"name": "bfx-api-node-models", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Object models for usage with the Bitfinex node API", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -7,3 +7,3 @@ /* eslint-env mocha */ | ||
const DATA = ['fUSD', [ | ||
const DATA = [ | ||
0.00009351, | ||
@@ -22,3 +22,3 @@ 0.00009526, | ||
2.7e-7 | ||
]] | ||
] | ||
@@ -29,3 +29,2 @@ describe('FundingTicker model', () => { | ||
assert.equal(ticker.symbol, 'fUSD') | ||
assert.equal(ticker.frr, 0.00009351) | ||
@@ -56,3 +55,2 @@ assert.equal(ticker.bid, 0.00009526) | ||
assert.equal(obj.symbol, 'fUSD') | ||
assert.equal(obj.frr, 0.00009351) | ||
@@ -59,0 +57,0 @@ assert.equal(obj.bid, 0.00009526) |
@@ -7,3 +7,3 @@ /* eslint-env mocha */ | ||
const DATA = ['tETHUSD', [ | ||
const DATA = [ | ||
228.56, | ||
@@ -19,3 +19,3 @@ 430.1902224, | ||
211.19 | ||
]] | ||
] | ||
@@ -26,3 +26,2 @@ describe('TradingTicker model', () => { | ||
assert.equal(ticker.symbol, 'tETHUSD') | ||
assert.equal(ticker.bid, 228.56) | ||
@@ -50,3 +49,2 @@ assert.equal(ticker.bidSize, 430.1902224) | ||
assert.equal(obj.symbol, 'tETHUSD') | ||
assert.equal(obj.bid, 228.56) | ||
@@ -53,0 +51,0 @@ assert.equal(obj.bidSize, 430.1902224) |
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
87490
2966