react-native-mmkv 2.3.3 → 2.4.0
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
CHANGED
|
@@ -170,6 +170,10 @@ storage.recrypt('hunter2')
|
|
|
170
170
|
storage.recrypt(undefined)
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
+
## Testing with Jest
|
|
174
|
+
|
|
175
|
+
A mocked MMKV instance is automatically used when testing with Jest, so you will be able to use `new MMKV()` as per normal in your tests. Refer to [example/test/MMKV.test.ts](example/test/MMKV.test.ts) for an example.
|
|
176
|
+
|
|
173
177
|
## Documentation
|
|
174
178
|
|
|
175
179
|
* [Hooks](./docs/HOOKS.md)
|
|
@@ -232,7 +232,7 @@ jsi::Value MmkvHostObject::get(jsi::Runtime& runtime, const jsi::PropNameID& pro
|
|
|
232
232
|
size_t count) -> jsi::Value {
|
|
233
233
|
if (arguments[0].isUndefined()) {
|
|
234
234
|
// reset encryption key to "no encryption"
|
|
235
|
-
instance->reKey(
|
|
235
|
+
instance->reKey(std::string());
|
|
236
236
|
} else if (arguments[0].isString()) {
|
|
237
237
|
// reKey(..) with new encryption-key
|
|
238
238
|
auto encryptionKey = arguments[0].getString(runtime).utf8(runtime);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-mmkv",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "The fastest key/value storage for React Native. ~30x faster than AsyncStorage! Works on Android, iOS and Web.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|