Comparing version 0.1.7 to 0.1.8
@@ -7,9 +7,9 @@ var assert = require('assert'); | ||
// Whatever currency comes first should be in "symbol" and the other one must be in "currency". | ||
// EUR GBP AUD USD CAD CHF MXN HKD JPY INR NOK SEK | ||
// EUR GBP AUD USD TRY ZAR CAD CHF MXN HKD JPY INR NOK SEK RUB | ||
var CURRENCIES = [ | ||
'KRW', 'EUR', 'GBP', 'AUD', | ||
'USD', 'CAD', 'CHF', 'MXN', | ||
'HKD', 'JPY', 'INR', 'NOK', | ||
'SEK' | ||
'USD', 'TRY', 'ZAR', 'CAD', | ||
'CHF', 'MXN', 'HKD', 'JPY', | ||
'INR', 'NOK', 'SEK', 'RUB' | ||
]; | ||
@@ -16,0 +16,0 @@ |
@@ -1,3 +0,1 @@ | ||
var util = require('util'); | ||
var _ = require('lodash'); | ||
@@ -4,0 +2,0 @@ var CommandBuffer = require('command-buffer'); |
@@ -1,3 +0,1 @@ | ||
var util = require('util'); | ||
var _ = require('lodash'); | ||
@@ -4,0 +2,0 @@ |
var net = require('net'); | ||
var util = require('util'); | ||
@@ -15,6 +14,6 @@ var _ = require('lodash'); | ||
this._connected = false; | ||
this._dataFragment = ''; | ||
this._neverReceived = true; | ||
this._neverSent = true; | ||
this._waitingAsync = false; | ||
this.dataFragment = ''; // Prevents partial packets from getting lost (added by heberallred) | ||
} | ||
@@ -30,9 +29,9 @@ | ||
Socket.prototype._onData = function (data) { | ||
var dataWithFragment = this.dataFragment + data.toString(); | ||
var dataWithFragment = this._dataFragment + data.toString(); | ||
var tokens = dataWithFragment.split(EOL); //.slice(0, -1); | ||
if (tokens[tokens.length-1] != ''){ | ||
this.dataFragment = tokens[tokens.length-1]; | ||
var tokens = dataWithFragment.split(EOL); | ||
if (tokens[tokens.length - 1] !== '') { | ||
this._dataFragment = tokens[tokens.length - 1]; | ||
} else { | ||
this.dataFragment = ''; | ||
this._dataFragment = ''; | ||
} | ||
@@ -39,0 +38,0 @@ tokens = tokens.slice(0, -1); |
{ | ||
"name": "ib", | ||
"description": "Interactive Brokers TWS (or IB Gateway) API client library for Node.js", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": { |
111337
2905