MCPcopy Create free account
hub / github.com/codename-co/stack / LocalStorageManager

Function LocalStorageManager

hub/2048/js/local_storage_manager.js:21–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19};
20
21function LocalStorageManager() {
22 this.bestScoreKey = "bestScore";
23 this.gameStateKey = "gameState";
24
25 var supported = this.localStorageSupported();
26 this.storage = supported ? window.localStorage : window.fakeStorage;
27}
28
29LocalStorageManager.prototype.localStorageSupported = function () {
30 var testKey = "test";

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected