@alwatr/local-storage 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.7](https://github.com/Alwatr/nanolib/compare/@alwatr/local-storage@1.0.6...@alwatr/local-storage@1.0.7) (2024-08-31)
7
+
8
+ ### Dependencies update
9
+
10
+ * update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @AliMD
11
+
12
+ ## [1.0.6](https://github.com/Alwatr/nanolib/compare/@alwatr/local-storage@1.0.5...@alwatr/local-storage@1.0.6) (2024-07-04)
13
+
14
+ ### Dependencies update
15
+
16
+ * update all dependencies ([0e908b4](https://github.com/Alwatr/nanolib/commit/0e908b476a6b976ec2447f864c8cafcbb8a0f099)) by @
17
+
6
18
  ## [1.0.5](https://github.com/Alwatr/nanolib/compare/@alwatr/local-storage@1.0.4...@alwatr/local-storage@1.0.5) (2024-05-12)
7
19
 
8
20
  **Note:** Version bump only for package @alwatr/local-storage
package/dist/main.cjs CHANGED
@@ -1,3 +1,3 @@
1
- /* @alwatr/local-storage v1.0.5 */
1
+ /* @alwatr/local-storage v1.0.7 */
2
2
  "use strict";var l=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var n in e)l(t,n,{get:e[n],enumerable:!0})},u=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of a(e))!c.call(t,o)&&o!==n&&l(t,o,{get:()=>e[o],enumerable:!(r=i(e,o))||r.enumerable});return t};var y=t=>u(l({},"__esModule",{value:!0}),t);var p={};g(p,{localJsonStorage:()=>J});module.exports=y(p);function m(t){try{return JSON.parse(t)}catch(e){return console.error("parseJson","invalid_json",e),null}}var J={key_(t,e=1){return`${t}.v${e}`},getItem(t,e,n=1){let r=this.key_(t,n),o=localStorage.getItem(r);if(o===null)return e;let s=m(o);return s===null||typeof s!="object"?e:s},setItem(t,e,n=1){let r=this.key_(t,n);localStorage.setItem(r,JSON.stringify(e))},removeItem(t,e=1){let n=this.key_(t,e);window.localStorage.removeItem(n)}};0&&(module.exports={localJsonStorage});
3
3
  //# sourceMappingURL=main.cjs.map
package/dist/main.d.ts CHANGED
@@ -40,7 +40,7 @@ export declare const localJsonStorage: {
40
40
  * localJsonStorage.setItem('myItem', {a: 1, b: 2});
41
41
  * ```
42
42
  */
43
- readonly setItem: <T_1 extends Json>(name: string, value: T_1, version?: number) => void;
43
+ readonly setItem: <T extends Json>(name: string, value: T, version?: number) => void;
44
44
  /**
45
45
  * Removes an item from the local storage.
46
46
  *
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAY,MAAM,qBAAqB,CAAC;AAyBzD;;GAEG;AACH,eAAO,MAAM,gBAAgB;IAC3B;;;;;;;;;;OAUG;0BACQ,MAAM,uBAAgB,MAAM;IAIvC;;;;;;;;;;;;OAYG;6CAC2B,MAAM,gBAAgB,CAAC,uBAAgB,CAAC;IAStE;;;;;;;;;;OAUG;+CAC2B,MAAM,mCAA0B,IAAI;IAKlE;;;;;;;;;OASG;gCACc,MAAM,uBAAgB,IAAI;CAInC,CAAC"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAY,MAAM,qBAAqB,CAAC;AAyBzD;;GAEG;AACH,eAAO,MAAM,gBAAgB;IAC3B;;;;;;;;;;OAUG;0BACQ,MAAM,uBAAgB,MAAM;IAIvC;;;;;;;;;;;;OAYG;uBACK,CAAC,SAAS,IAAI,QAAQ,MAAM,gBAAgB,CAAC,uBAAgB,CAAC;IAStE;;;;;;;;;;OAUG;uBACK,CAAC,SAAS,IAAI,QAAQ,MAAM,SAAS,CAAC,uBAAgB,IAAI;IAKlE;;;;;;;;;OASG;gCACc,MAAM,uBAAgB,IAAI;CAInC,CAAC"}
package/dist/main.mjs CHANGED
@@ -1,3 +1,3 @@
1
- /* @alwatr/local-storage v1.0.5 */
1
+ /* @alwatr/local-storage v1.0.7 */
2
2
  function l(t){try{return JSON.parse(t)}catch(e){return console.error("parseJson","invalid_json",e),null}}var i={key_(t,e=1){return`${t}.v${e}`},getItem(t,e,n=1){let o=this.key_(t,n),s=localStorage.getItem(o);if(s===null)return e;let r=l(s);return r===null||typeof r!="object"?e:r},setItem(t,e,n=1){let o=this.key_(t,n);localStorage.setItem(o,JSON.stringify(e))},removeItem(t,e=1){let n=this.key_(t,e);window.localStorage.removeItem(n)}};export{i as localJsonStorage};
3
3
  //# sourceMappingURL=main.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwatr/local-storage",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "`localJsonStorage` is a utility object in our TypeScript package that provides methods for interacting with the local storage in a structured and versioned manner.",
5
5
  "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
6
6
  "keywords": [
@@ -67,11 +67,11 @@
67
67
  "clean": "rm -rfv dist *.tsbuildinfo"
68
68
  },
69
69
  "devDependencies": {
70
- "@alwatr/nano-build": "^1.3.6",
70
+ "@alwatr/nano-build": "^1.3.8",
71
71
  "@alwatr/prettier-config": "^1.0.4",
72
- "@alwatr/tsconfig-base": "^1.1.2",
73
- "@alwatr/type-helper": "^1.2.3",
74
- "typescript": "^5.4.5"
72
+ "@alwatr/tsconfig-base": "^1.2.0",
73
+ "@alwatr/type-helper": "^1.2.5",
74
+ "typescript": "^5.5.4"
75
75
  },
76
- "gitHead": "c69cb32c4076c208d316ace582e73deb328436bf"
76
+ "gitHead": "5d81b77988089edb24aa6853d0a98fdeb85dbf77"
77
77
  }