@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 +1 -1
- package/lib/index.js +6 -12
- package/lib/index.js.map +1 -1
- package/module/index.js +5 -11
- package/module/index.js.map +1 -1
- package/package.json +8 -9
- package/CHANGELOG.md +0 -83
package/README.md
CHANGED
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) =>
|
|
15
|
-
return storage_1.kvsStorage(
|
|
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":"
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
return
|
|
4
|
-
|
|
5
|
-
|
|
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
|
package/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
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.
|
|
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.
|
|
48
|
+
"@kvs/storage": "^2.1.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@jsdevtools/karma-config": "^3.1.7",
|
|
52
|
-
"@types/mocha": "^
|
|
53
|
-
"@types/node": "^
|
|
54
|
-
"karma": "^
|
|
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
|
-
"
|
|
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.
|
|
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": "
|
|
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))
|