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