|
|
@ -1,16 +1,16 @@ |
|
|
|
'use strict' |
|
|
|
'use strict' |
|
|
|
|
|
|
|
|
|
|
|
function Storage () { |
|
|
|
function Storage () { |
|
|
|
this.exists = function (key) { |
|
|
|
this.exists = function (name) { |
|
|
|
return !!this.get(key) |
|
|
|
return !!this.get(name) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.get = function (key) { |
|
|
|
this.get = function (name) { |
|
|
|
return window.localStorage.getItem(key) |
|
|
|
return window.localStorage.getItem(name) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.set = function (key, content) { |
|
|
|
this.set = function (name, content) { |
|
|
|
window.localStorage.setItem(key, content) |
|
|
|
window.localStorage.setItem(name, content) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.keys = function () { |
|
|
|
this.keys = function () { |
|
|
|