initial changes

This commit is contained in:
herrrta
2025-01-08 21:52:31 -05:00
parent 76cdb2b3f8
commit 75820adcbc
3 changed files with 81 additions and 4 deletions

View File

@@ -13,5 +13,10 @@ MMKV.prototype.get = function <T> (key: string): T | undefined {
}
MMKV.prototype.setAny = function (key: string, value: any | undefined): void {
this.set(key, JSON.stringify(value));
if (value === undefined) {
this.delete(key)
}
else {
this.set(key, JSON.stringify(value));
}
}