@canvas-js/signatures
Advanced tools
Comparing version 0.12.3-next.2 to 0.12.3-next.3
@@ -0,4 +1,6 @@ | ||
import { MMKV } from "react-native-mmkv"; | ||
export declare const storage: MMKV; | ||
declare const _default: { | ||
get(key: string): string | null; | ||
set(key: string, value: any): void; | ||
set(key: string, value: string): void; | ||
clear(prefix?: string): void; | ||
@@ -5,0 +7,0 @@ getDomain(): string; |
@@ -1,13 +0,14 @@ | ||
const cache = new Map(); | ||
import { MMKV } from "react-native-mmkv"; | ||
export const storage = new MMKV(); | ||
export default { | ||
get(key) { | ||
return cache.get(key) ?? null; | ||
return storage.getString(key) ?? null; | ||
}, | ||
set(key, value) { | ||
cache.set(key, value); | ||
storage.set(key, value); | ||
}, | ||
clear(prefix = "") { | ||
for (const key of cache.keys()) { | ||
if (key.startsWith(prefix)) { | ||
cache.delete(key); | ||
for (const key of storage.getAllKeys()) { | ||
if (key?.startsWith(prefix)) { | ||
storage.delete(key); | ||
} | ||
@@ -14,0 +15,0 @@ } |
{ | ||
"name": "@canvas-js/signatures", | ||
"version": "0.12.3-next.2", | ||
"version": "0.12.3-next.3", | ||
"author": "Canvas Technologies, Inc. (https://canvas.xyz)", | ||
@@ -27,4 +27,4 @@ "type": "module", | ||
"dependencies": { | ||
"@canvas-js/interfaces": "0.12.3-next.2", | ||
"@canvas-js/utils": "0.12.3-next.2", | ||
"@canvas-js/interfaces": "0.12.3-next.3", | ||
"@canvas-js/utils": "0.12.3-next.3", | ||
"@ipld/dag-cbor": "^9.2.1", | ||
@@ -36,3 +36,6 @@ "@ipld/dag-json": "^10.2.2", | ||
"multiformats": "^13.3.0" | ||
}, | ||
"devDependencies": { | ||
"react-native-mmkv": "^3.1.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29987
521
1
+ Added@canvas-js/interfaces@0.12.3-next.3(transitive)
+ Added@canvas-js/utils@0.12.3-next.3(transitive)
- Removed@canvas-js/interfaces@0.12.3-next.2(transitive)
- Removed@canvas-js/utils@0.12.3-next.2(transitive)