exaquark-js
Advanced tools
Comparing version 1.0.14 to 1.0.15
40
core.js
@@ -17,28 +17,2 @@ 'use strict'; | ||
// const loadJSONP = (() => { | ||
// let unique = 0 | ||
// return (url, callback, context) => { | ||
// // INIT | ||
// let name = '_jsonp_' + unique++ | ||
// if (url.match(/\?/)) url += '&callback=' + name | ||
// else url += '?callback=' + name | ||
// | ||
// // Create script | ||
// let script = document.createElement('script') | ||
// script.type = 'text/javascript' | ||
// script.src = url | ||
// | ||
// // Setup handler | ||
// window[name] = data => { | ||
// callback.call((context || window), data) | ||
// document.getElementsByTagName('head')[0].removeChild(script) | ||
// script = null | ||
// delete window[name] | ||
// } | ||
// | ||
// // Load JSON | ||
// document.getElementsByTagName('head')[0].appendChild(script) | ||
// } | ||
// })() | ||
/** | ||
@@ -99,3 +73,3 @@ * Represents an exaQuark instance | ||
var response = res.data; | ||
self.entryPoint = response.entryPoint; | ||
self.entryPoint = response.sentryPoint; // use secure socket | ||
self.iid = response.iid; | ||
@@ -213,3 +187,3 @@ | ||
// leaving neighborhood | ||
if (data.neighbors) this.onRemovesMessage(data.neighbors); | ||
if (data.entities) this.onRemovesMessage(data.entities); | ||
break; | ||
@@ -276,4 +250,4 @@ } | ||
value: function addNeighbor(n) { | ||
this.trigger('neighbor:enter', n); | ||
this.neighborHash[n.iid] = n; | ||
this.trigger('neighbor:enter', n); | ||
} | ||
@@ -283,10 +257,10 @@ }, { | ||
value: function updateNeighbor(n) { | ||
this.trigger('neighbor:updates', n); | ||
this.neighborHash[n.iid] = n; | ||
this.trigger('neighbor:updates', n); | ||
} | ||
}, { | ||
key: 'removeNeighbor', | ||
value: function removeNeighbor(n) { | ||
delete this.neighborHash[n.iid]; | ||
this.trigger('neighbor:leave', n); | ||
value: function removeNeighbor(iid) { | ||
this.trigger('neighbor:leave', iid); | ||
delete this.neighborHash[iid]; | ||
} | ||
@@ -293,0 +267,0 @@ }, { |
{ | ||
"name": "exaquark-js", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"description": "JS wrapper for exaquark.com", | ||
@@ -5,0 +5,0 @@ "main": "./", |
@@ -37,2 +37,7 @@ # exaQuark JS | ||
##### 1.0.15 | ||
- Switching to secure socket | ||
- Fixing removes function | ||
##### 1.0.14 | ||
@@ -39,0 +44,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
7
74
15899
361