@kvs/localstorage 1.2.0 → 2.1.1

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @kvs/localstorage
1
+ # @kvs/localstorage ![](https://badgen.net/bundlephobia/minzip/@kvs/localstorage)
2
2
 
3
3
  localstorage for KVS.
4
4
 
package/lib/index.js CHANGED
@@ -1,18 +1,12 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.kvsLocalStorage = void 0;
13
4
  const storage_1 = require("@kvs/storage");
14
- const kvsLocalStorage = (options) => __awaiter(void 0, void 0, void 0, function* () {
15
- return storage_1.kvsStorage(Object.assign(Object.assign({}, options), { storage: window.localStorage }));
16
- });
5
+ const kvsLocalStorage = async (options) => {
6
+ return (0, storage_1.kvsStorage)({
7
+ ...options,
8
+ storage: window.localStorage
9
+ });
10
+ };
17
11
  exports.kvsLocalStorage = kvsLocalStorage;
18
12
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAAiE;AAU1D,MAAM,eAAe,GAAG,CAC3B,OAAuC,EACZ,EAAE;IAC7B,OAAO,oBAAU,iCACV,OAAO,KACV,OAAO,EAAE,MAAM,CAAC,YAAY,IAC9B,CAAC;AACP,CAAC,CAAA,CAAC;AAPW,QAAA,eAAe,mBAO1B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,0CAAiE;AAU1D,MAAM,eAAe,GAAG,KAAK,EAChC,OAAuC,EACZ,EAAE;IAC7B,OAAO,IAAA,oBAAU,EAAC;QACd,GAAG,OAAO;QACV,OAAO,EAAE,MAAM,CAAC,YAAY;KAC/B,CAAC,CAAC;AACP,CAAC,CAAC;AAPW,QAAA,eAAe,mBAO1B"}
package/module/index.js CHANGED
@@ -1,14 +1,8 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1
+ import { kvsStorage } from "@kvs/storage";
2
+ export const kvsLocalStorage = async (options) => {
3
+ return kvsStorage({
4
+ ...options,
5
+ storage: window.localStorage
8
6
  });
9
7
  };
10
- import { kvsStorage } from "@kvs/storage";
11
- export const kvsLocalStorage = (options) => __awaiter(void 0, void 0, void 0, function* () {
12
- return kvsStorage(Object.assign(Object.assign({}, options), { storage: window.localStorage }));
13
- });
14
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAyB,UAAU,EAAE,MAAM,cAAc,CAAC;AAUjE,MAAM,CAAC,MAAM,eAAe,GAAG,CAC3B,OAAuC,EACZ,EAAE;IAC7B,OAAO,UAAU,iCACV,OAAO,KACV,OAAO,EAAE,MAAM,CAAC,YAAY,IAC9B,CAAC;AACP,CAAC,CAAA,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,UAAU,EAAE,MAAM,cAAc,CAAC;AAUjE,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAChC,OAAuC,EACZ,EAAE;IAC7B,OAAO,UAAU,CAAC;QACd,GAAG,OAAO;QACV,OAAO,EAAE,MAAM,CAAC,YAAY;KAC/B,CAAC,CAAC;AACP,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kvs/localstorage",
3
- "version": "1.2.0",
3
+ "version": "2.1.1",
4
4
  "description": "localstorage for KVS.",
5
5
  "keywords": [
6
6
  "kvs",
@@ -45,23 +45,22 @@
45
45
  "trailingComma": "none"
46
46
  },
47
47
  "dependencies": {
48
- "@kvs/storage": "^1.2.0"
48
+ "@kvs/storage": "^2.1.1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@jsdevtools/karma-config": "^3.1.7",
52
- "@types/mocha": "^8.0.1",
53
- "@types/node": "^14.0.27",
54
- "karma": "^5.1.1",
52
+ "@types/mocha": "^9.0.0",
53
+ "@types/node": "^16.9.1",
54
+ "karma": "^6.3.4",
55
55
  "karma-cli": "^2.0.0",
56
- "lerna": "^3.22.1",
57
- "mocha": "^8.1.1",
56
+ "mocha": "^9.1.1",
58
57
  "prettier": "^2.0.5",
59
58
  "rimraf": "^3.0.2",
60
- "ts-loader": "^8.1.0",
59
+ "ts-loader": "^8.2.0",
61
60
  "typescript": "^4.2.4"
62
61
  },
63
62
  "publishConfig": {
64
63
  "access": "public"
65
64
  },
66
- "gitHead": "63a9bf838e8efa7690163d28476edd90e2c6b94c"
65
+ "gitHead": "d8ec6e0ba796bc2cab189a395bcda9754ffc4c9e"
67
66
  }
package/CHANGELOG.md DELETED
@@ -1,83 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [1.2.0](https://github.com/azu/kvs/compare/v1.1.0...v1.2.0) (2021-04-17)
7
-
8
-
9
- ### Features
10
-
11
- * **types:** Use Key Remapping in Mapped Types. ([#17](https://github.com/azu/kvs/issues/17)) ([7c099be](https://github.com/azu/kvs/commit/7c099be4ae39adedba78d111574347395e024362))
12
-
13
-
14
- ### BREAKING CHANGES
15
-
16
- * **types:** require TypeScript 4.1+
17
-
18
- It aims to support to following schema:
19
-
20
- ```ts
21
- const storage = kvs<{
22
- [index: string]: string;
23
- }>;
24
- ```
25
-
26
-
27
-
28
-
29
-
30
- # [1.1.0](https://github.com/azu/kvs/compare/v1.0.0...v1.1.0) (2020-10-29)
31
-
32
-
33
- ### Features
34
-
35
- * **examples:** add basic example ([#14](https://github.com/azu/kvs/issues/14)) ([351215d](https://github.com/azu/kvs/commit/351215d6c04158201768036caaa6e792c72717ea))
36
-
37
-
38
-
39
-
40
-
41
- # [1.0.0](https://github.com/azu/kvs/compare/v0.3.1...v1.0.0) (2020-08-22)
42
-
43
- **Note:** Version bump only for package @kvs/localstorage
44
-
45
-
46
-
47
-
48
-
49
- # [0.3.0](https://github.com/azu/kvs/compare/v0.2.1...v0.3.0) (2020-08-22)
50
-
51
- **Note:** Version bump only for package @kvs/localstorage
52
-
53
-
54
-
55
-
56
-
57
- ## [0.2.1](https://github.com/azu/kvs/compare/v0.2.0...v0.2.1) (2020-08-22)
58
-
59
- **Note:** Version bump only for package @kvs/localstorage
60
-
61
-
62
-
63
-
64
-
65
- # [0.2.0](https://github.com/azu/kvs/compare/v0.1.0...v0.2.0) (2020-08-08)
66
-
67
-
68
- ### Features
69
-
70
- * **@kvs/localstorage:** migrate to Schema type ([0c84640](https://github.com/azu/kvs/commit/0c84640c1c1d28955c60ca83d8a01bdce936d9ef))
71
-
72
-
73
-
74
-
75
-
76
- # 0.1.0 (2020-08-08)
77
-
78
-
79
- ### Features
80
-
81
- * **@kvs/node-localstorage:** add node implementation ([5160012](https://github.com/azu/kvs/commit/516001286c96ac85cb54d55fbba62549d6d7eb0e))
82
- * add `close()` to interface ([a269d1d](https://github.com/azu/kvs/commit/a269d1dda6ce63388771e6fa4d897a26f284b72c))
83
- * **@kvs/localstorage:** add localstorage implementation ([54fc38b](https://github.com/azu/kvs/commit/54fc38b8a3a75923d8e8383af9c907979a2dba52))