exaquark-js
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -13,4 +13,2 @@ 'use strict'; | ||
var WebSocket = require('ws'); | ||
var loadJSONP = function () { | ||
@@ -70,3 +68,3 @@ var unique = 0; | ||
this.state = null; // holds the latest client state | ||
this.transport = WebSocket; | ||
this.transport = options.transport || window.WebSocket; | ||
@@ -104,3 +102,3 @@ // this.heartbeatTimer = null | ||
var encodedState = encodeURIComponent(JSON.stringify(initialState)); | ||
_this.conn = new WebSocket(_this.entryPoint + '?state=' + encodedState); | ||
_this.conn = new _this.transport(_this.entryPoint + '?state=' + encodedState); // eslint-disable-line | ||
_this.conn.onopen = function (data) { | ||
@@ -107,0 +105,0 @@ return _this.onConnOpen(data); |
{ | ||
"name": "exaquark-js", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "JS wrapper for exaquark.com", | ||
@@ -63,5 +63,3 @@ "main": "./lib/index.js", | ||
}, | ||
"dependencies": { | ||
"ws": "^4.0.0" | ||
} | ||
"dependencies": {} | ||
} |
import { log } from './utils/private' | ||
const WebSocket = require('ws') | ||
@@ -54,3 +53,3 @@ const loadJSONP = (() => { | ||
this.state = null // holds the latest client state | ||
this.transport = WebSocket | ||
this.transport = options.transport || window.WebSocket | ||
@@ -80,3 +79,3 @@ // this.heartbeatTimer = null | ||
let encodedState = encodeURIComponent(JSON.stringify(initialState)) | ||
this.conn = new WebSocket(`${this.entryPoint}?state=${encodedState}`) | ||
this.conn = new this.transport(`${this.entryPoint}?state=${encodedState}`) // eslint-disable-line | ||
this.conn.onopen = data => this.onConnOpen(data) | ||
@@ -83,0 +82,0 @@ this.conn.onerror = error => this.onConnError(error) |
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
20786
0
552
- Removedws@^4.0.0
- Removedasync-limiter@1.0.1(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedws@4.1.0(transitive)