1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/bower_components/emby-apiclient/appstorage-memory.js

22 lines
447 B
JavaScript
Raw Normal View History

2016-08-14 00:30:59 -04:00
define([], function () {
2016-10-02 02:13:04 -04:00
'use strict';
2016-08-14 00:30:59 -04:00
2016-10-02 02:13:04 -04:00
function MyStore(defaultObject) {
2016-08-14 00:30:59 -04:00
this.localData = {};
}
2016-10-02 02:13:04 -04:00
MyStore.prototype.setItem = function (name, value) {
2016-08-14 00:30:59 -04:00
this.localData[name] = value;
};
2016-10-02 02:13:04 -04:00
MyStore.prototype.getItem = function (name) {
2016-08-14 00:30:59 -04:00
return this.localData[name];
};
2016-10-02 02:13:04 -04:00
MyStore.prototype.removeItem = function (name) {
2016-08-14 00:30:59 -04:00
this.localData[name] = null;
};
2016-10-02 02:13:04 -04:00
return new MyStore();
2016-08-14 00:30:59 -04:00
});