colyseus.js
Advanced tools
Comparing version 0.15.17 to 0.15.18
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -15,13 +15,20 @@ | ||
if (!storage) { | ||
storage = (typeof (cc) !== 'undefined' && cc.sys && cc.sys.localStorage) | ||
? cc.sys.localStorage // compatibility with cocos creator | ||
: typeof (window) !== "undefined" && window.localStorage //RN does have window object at this point, but localStorage is not defined | ||
? window.localStorage // regular browser environment | ||
: { | ||
cache: {}, | ||
setItem: function (key, value) { this.cache[key] = value; }, | ||
getItem: function (key) { this.cache[key]; }, | ||
removeItem: function (key) { delete this.cache[key]; }, | ||
}; | ||
try { | ||
storage = (typeof (cc) !== 'undefined' && cc.sys && cc.sys.localStorage) | ||
? cc.sys.localStorage // compatibility with cocos creator | ||
: window.localStorage; // RN does have window object at this point, but localStorage is not defined | ||
} | ||
catch (e) { | ||
// ignore error | ||
} | ||
} | ||
if (!storage) { | ||
// mock localStorage if not available (Node.js or RN environment) | ||
storage = { | ||
cache: {}, | ||
setItem: function (key, value) { this.cache[key] = value; }, | ||
getItem: function (key) { this.cache[key]; }, | ||
removeItem: function (key) { delete this.cache[key]; }, | ||
}; | ||
} | ||
return storage; | ||
@@ -28,0 +35,0 @@ } |
@@ -1,2 +0,2 @@ | ||
// colyseus.js@0.15.17 | ||
// colyseus.js@0.15.18 | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -13,13 +13,20 @@ "use strict"; | ||
if (!storage) { | ||
storage = (typeof (cc) !== 'undefined' && cc.sys && cc.sys.localStorage) | ||
? cc.sys.localStorage // compatibility with cocos creator | ||
: typeof (window) !== "undefined" && window.localStorage //RN does have window object at this point, but localStorage is not defined | ||
? window.localStorage // regular browser environment | ||
: { | ||
cache: {}, | ||
setItem: function (key, value) { this.cache[key] = value; }, | ||
getItem: function (key) { this.cache[key]; }, | ||
removeItem: function (key) { delete this.cache[key]; }, | ||
}; | ||
try { | ||
storage = (typeof (cc) !== 'undefined' && cc.sys && cc.sys.localStorage) | ||
? cc.sys.localStorage // compatibility with cocos creator | ||
: window.localStorage; // RN does have window object at this point, but localStorage is not defined | ||
} | ||
catch (e) { | ||
// ignore error | ||
} | ||
} | ||
if (!storage) { | ||
// mock localStorage if not available (Node.js or RN environment) | ||
storage = { | ||
cache: {}, | ||
setItem: function (key, value) { this.cache[key] = value; }, | ||
getItem: function (key) { this.cache[key]; }, | ||
removeItem: function (key) { delete this.cache[key]; }, | ||
}; | ||
} | ||
return storage; | ||
@@ -26,0 +33,0 @@ } |
{ | ||
"name": "colyseus.js", | ||
"version": "0.15.17", | ||
"version": "0.15.18", | ||
"description": "Colyseus Multiplayer SDK for JavaScript/TypeScript", | ||
@@ -5,0 +5,0 @@ "author": "Endel Dreyer", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1949731
16823