web3-providers-ws
Advanced tools
Comparing version 1.0.0-beta.15 to 1.0.0-beta.16
{ | ||
"name": "web3-providers-ws", | ||
"version": "1.0.0-beta.15", | ||
"version": "1.0.0-beta.16", | ||
"description": "Module to handle web3 RPC connections over WebSockets.", | ||
@@ -10,5 +10,5 @@ "repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-providers-ws", | ||
"underscore": "1.8.3", | ||
"web3-core-helpers": "^1.0.0-beta.15", | ||
"web3-core-helpers": "^1.0.0-beta.16", | ||
"websocket": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible" | ||
} | ||
} |
@@ -27,4 +27,8 @@ /* | ||
var errors = require('web3-core-helpers').errors; | ||
if (typeof global !== 'undefined') { | ||
var WebSocket = require('websocket').w3cwebsocket; | ||
var Ws = null; | ||
if (typeof window !== 'undefined') { | ||
Ws = window.WebSocket; | ||
} else { | ||
Ws = require('websocket').w3cwebsocket; | ||
} | ||
@@ -39,3 +43,3 @@ // Default connection ws://localhost:8546 | ||
this.notificationCallbacks = []; | ||
this.connection = new WebSocket(url); | ||
this.connection = new Ws(url); | ||
@@ -42,0 +46,0 @@ |
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
9655
251