appbase-js
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -8,2 +8,4 @@ var WebSocket = require('ws') | ||
ee.setMaxListeners(0) | ||
ee.send = function(dataObj) { | ||
@@ -10,0 +12,0 @@ if(conn.readyState !== 1) { |
{ | ||
"name": "appbase-js", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"homepage": "https://github.com/appbaseio/appbase-js", | ||
@@ -5,0 +5,0 @@ "authors": [ |
{ | ||
"name": "appbase-js", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Appbase.io streaming client lib for Javascript", | ||
@@ -21,2 +21,3 @@ "main": "appbase.js", | ||
"hyperquest": "^1.2.0", | ||
"immutable": "^3.7.5", | ||
"through2": "^2.0.0", | ||
@@ -23,0 +24,0 @@ "ws": "^0.8.0" |
@@ -5,2 +5,3 @@ var Readable = require('stream').Readable; | ||
var through2 = require('through2') | ||
var immutable = require('immutable') | ||
var EventEmitter = require('events').EventEmitter | ||
@@ -30,3 +31,3 @@ | ||
this.request = { | ||
this.request = immutable.fromJS({ | ||
id: this.id, | ||
@@ -37,3 +38,3 @@ path: this.client.appname + '/' + this.path + '?' + querystring.stringify(this.params), | ||
authorization: 'Basic ' + (new Buffer(this.client.credentials).toString('base64')) | ||
} | ||
}) | ||
@@ -136,8 +137,7 @@ this.resultStream = through2.obj() | ||
} | ||
var unsubRequest = {} | ||
for(var key in this.request) { | ||
unsubRequest[key] = this.request[key] | ||
var unsubRequest = this.request.set('unsubscribe', true) | ||
if(this.unsubscribed !== true) { | ||
this.client.ws.send(unsubRequest) | ||
} | ||
unsubRequest.unsubscribe = true | ||
this.client.ws.send(unsubRequest) | ||
this.unsubscribed = true | ||
} | ||
@@ -144,0 +144,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
716813
16251
6
24
+ Addedimmutable@^3.7.5
+ Addedimmutable@3.8.2(transitive)