@manojadams/session-store
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -1,2 +0,2 @@ | ||
module.exports=/*#__PURE__*/function(){function t(t){this.__sessionData=void 0,this._name=void 0,this._createdAt=void 0,this._updatedAt=void 0,this.isReady=void 0,this._name=t||this.constructor.name,this.__sessionData={},this._createdAt=new Date,this._updatedAt=new Date,this.isReady=!1}var s=t.prototype;return s.init=function(){var t=sessionStorage.getItem(this._name);t&&(this.__sessionData=JSON.parse(t),this.isReady=!0)},s.getData=function(t){return this.__sessionData[t]},s.setData=function(t,s){this.__sessionData[t]=s,this._updatedAt=new Date},s.destroy=function(){var t=this.__sessionData._createdAt||this._createdAt.toISOString(),s=this._updatedAt.toISOString();this.__sessionData._createdAt=t,this.__sessionData._updatedAt=s,sessionStorage.setItem(this._name,JSON.stringify(this.__sessionData))},t}(); | ||
module.exports=/*#__PURE__*/function(){function t(t){this.__sessionData=void 0,this._name=void 0,this._createdAt=void 0,this._updatedAt=void 0,this.isReady=void 0,this._name=t||this.constructor.name,this.__sessionData={},this._createdAt=new Date,this._updatedAt=new Date,this.isReady=!1}var s=t.prototype;return s.init=function(t){var s=sessionStorage.getItem(this._name);s&&(this.__sessionData=JSON.parse(s),this.isReady=!0)},s.getData=function(t){return this.__sessionData[t]},s.setData=function(t,s){this.__sessionData[t]=s,this._updatedAt=new Date},s.destroy=function(){var t=this.__sessionData._createdAt||this._createdAt.toISOString(),s=this._updatedAt.toISOString();this.__sessionData._createdAt=t,this.__sessionData._updatedAt=s,sessionStorage.setItem(this._name,JSON.stringify(this.__sessionData))},t}(); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
var t=/*#__PURE__*/function(){function t(t){this.__sessionData=void 0,this._name=void 0,this._createdAt=void 0,this._updatedAt=void 0,this.isReady=void 0,this._name=t||this.constructor.name,this.__sessionData={},this._createdAt=new Date,this._updatedAt=new Date,this.isReady=!1}var s=t.prototype;return s.init=function(){var t=sessionStorage.getItem(this._name);t&&(this.__sessionData=JSON.parse(t),this.isReady=!0)},s.getData=function(t){return this.__sessionData[t]},s.setData=function(t,s){this.__sessionData[t]=s,this._updatedAt=new Date},s.destroy=function(){var t=this.__sessionData._createdAt||this._createdAt.toISOString(),s=this._updatedAt.toISOString();this.__sessionData._createdAt=t,this.__sessionData._updatedAt=s,sessionStorage.setItem(this._name,JSON.stringify(this.__sessionData))},t}();export{t as default}; | ||
var t=/*#__PURE__*/function(){function t(t){this.__sessionData=void 0,this._name=void 0,this._createdAt=void 0,this._updatedAt=void 0,this.isReady=void 0,this._name=t||this.constructor.name,this.__sessionData={},this._createdAt=new Date,this._updatedAt=new Date,this.isReady=!1}var s=t.prototype;return s.init=function(t){var s=sessionStorage.getItem(this._name);s&&(this.__sessionData=JSON.parse(s),this.isReady=!0)},s.getData=function(t){return this.__sessionData[t]},s.setData=function(t,s){this.__sessionData[t]=s,this._updatedAt=new Date},s.destroy=function(){var t=this.__sessionData._createdAt||this._createdAt.toISOString(),s=this._updatedAt.toISOString();this.__sessionData._createdAt=t,this.__sessionData._updatedAt=s,sessionStorage.setItem(this._name,JSON.stringify(this.__sessionData))},t}();export{t as default}; | ||
//# sourceMappingURL=index.modern.js.map |
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t||self).sessionStore=e()}(this,function(){/*#__PURE__*/ | ||
return function(){function t(t){this.__sessionData=void 0,this._name=void 0,this._createdAt=void 0,this._updatedAt=void 0,this.isReady=void 0,this._name=t||this.constructor.name,this.__sessionData={},this._createdAt=new Date,this._updatedAt=new Date,this.isReady=!1}var e=t.prototype;return e.init=function(){var t=sessionStorage.getItem(this._name);t&&(this.__sessionData=JSON.parse(t),this.isReady=!0)},e.getData=function(t){return this.__sessionData[t]},e.setData=function(t,e){this.__sessionData[t]=e,this._updatedAt=new Date},e.destroy=function(){var t=this.__sessionData._createdAt||this._createdAt.toISOString(),e=this._updatedAt.toISOString();this.__sessionData._createdAt=t,this.__sessionData._updatedAt=e,sessionStorage.setItem(this._name,JSON.stringify(this.__sessionData))},t}()}); | ||
return function(){function t(t){this.__sessionData=void 0,this._name=void 0,this._createdAt=void 0,this._updatedAt=void 0,this.isReady=void 0,this._name=t||this.constructor.name,this.__sessionData={},this._createdAt=new Date,this._updatedAt=new Date,this.isReady=!1}var e=t.prototype;return e.init=function(t){var e=sessionStorage.getItem(this._name);e&&(this.__sessionData=JSON.parse(e),this.isReady=!0)},e.getData=function(t){return this.__sessionData[t]},e.setData=function(t,e){this.__sessionData[t]=e,this._updatedAt=new Date},e.destroy=function(){var t=this.__sessionData._createdAt||this._createdAt.toISOString(),e=this._updatedAt.toISOString();this.__sessionData._createdAt=t,this.__sessionData._updatedAt=e,sessionStorage.setItem(this._name,JSON.stringify(this.__sessionData))},t}()}); | ||
//# sourceMappingURL=index.umd.js.map |
@@ -13,3 +13,3 @@ import { IStore } from "./constants"; | ||
constructor(_name?: string); | ||
init(): void; | ||
init(initData?: any): void; | ||
protected getData(dataKey: keyof T): (T & IStore)[keyof T]; | ||
@@ -16,0 +16,0 @@ protected setData(dataKey: keyof T, value: any): void; |
{ | ||
"name": "@manojadams/session-store", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "Simple state management with session storage", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
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
16283