@esportsplus/web-storage 0.1.4 → 0.1.6
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/build/index.d.ts +1 -1
- package/build/local/index.d.ts +1 -1
- package/build/local/index.js +1 -11
- package/package.json +1 -1
- package/src/local/index.ts +1 -15
package/build/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare const _default: {
|
|
|
19
19
|
push(key: string, ...values: any[]): void;
|
|
20
20
|
replace(values: {
|
|
21
21
|
[key: string]: any;
|
|
22
|
-
}
|
|
22
|
+
}): void;
|
|
23
23
|
shift(key: string): Promise<any>;
|
|
24
24
|
set(key: string, value: any): void;
|
|
25
25
|
sync(): Promise<void>;
|
package/build/local/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ declare class Store {
|
|
|
18
18
|
push(key: string, ...values: any[]): void;
|
|
19
19
|
replace(values: {
|
|
20
20
|
[key: string]: any;
|
|
21
|
-
}
|
|
21
|
+
}): void;
|
|
22
22
|
shift(key: string): Promise<any>;
|
|
23
23
|
set(key: string, value: any): void;
|
|
24
24
|
sync(): Promise<void>;
|
package/build/local/index.js
CHANGED
|
@@ -114,17 +114,7 @@ class Store {
|
|
|
114
114
|
await this.instance.setItem(key, data);
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
replace(values
|
|
118
|
-
if (whitelist.length) {
|
|
119
|
-
let whitelisted = {};
|
|
120
|
-
for (let i = 0, n = whitelist.length; i < n; i++) {
|
|
121
|
-
if (!values[whitelist[i]]) {
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
whitelisted[whitelist[i]] = values[whitelist[i]];
|
|
125
|
-
}
|
|
126
|
-
values = whitelisted;
|
|
127
|
-
}
|
|
117
|
+
replace(values) {
|
|
128
118
|
if (!Object.keys(values).length) {
|
|
129
119
|
return;
|
|
130
120
|
}
|
package/package.json
CHANGED
package/src/local/index.ts
CHANGED
|
@@ -155,21 +155,7 @@ class Store {
|
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
replace(values: { [key: string]: any }
|
|
159
|
-
if (whitelist.length) {
|
|
160
|
-
let whitelisted: { [key: string]: any } = {};
|
|
161
|
-
|
|
162
|
-
for (let i = 0, n = whitelist.length; i < n; i++) {
|
|
163
|
-
if (!values[whitelist[i]]) {
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
whitelisted[whitelist[i]] = values[whitelist[i]];
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
values = whitelisted;
|
|
171
|
-
}
|
|
172
|
-
|
|
158
|
+
replace(values: { [key: string]: any }): void {
|
|
173
159
|
if (!Object.keys(values).length) {
|
|
174
160
|
return;
|
|
175
161
|
}
|