@inappstory/game-center-api 1.3.4 → 1.3.5

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.
@@ -1,6 +1,7 @@
1
1
  export declare class LocalDataMap<K, V> extends Map<K, V> {
2
2
  set(key: K, value: V): this;
3
3
  delete(key: K): boolean;
4
+ clear(): void;
4
5
  protected init(entries: [K, V][]): this;
5
6
  }
6
7
  export declare let gameLocalData: LocalDataMap<string, any>;
package/lib/localData.js CHANGED
@@ -24,6 +24,10 @@ class LocalDataMap extends Map {
24
24
  }
25
25
  return removed;
26
26
  }
27
+ clear() {
28
+ super.clear();
29
+ setGameLocalData();
30
+ }
27
31
  init(entries) {
28
32
  entries.forEach(entrie => super.set(entrie[0], entrie[1]));
29
33
  return this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inappstory/game-center-api",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "",
5
5
  "dependencies": {
6
6
  "semver": "^7.3.8",