@react-native-async-storage/async-storage
Advanced tools
Comparing version 1.17.7 to 1.17.8
@@ -160,7 +160,3 @@ "use strict"; | ||
multiMerge: (keyValuePairs, callback) => { | ||
const promises = keyValuePairs.map(item => { | ||
var _AsyncStorage$mergeIt, _AsyncStorage$mergeIt2; | ||
return (_AsyncStorage$mergeIt = (_AsyncStorage$mergeIt2 = AsyncStorage.mergeItem) === null || _AsyncStorage$mergeIt2 === void 0 ? void 0 : _AsyncStorage$mergeIt2.call(AsyncStorage, item[0], item[1])) !== null && _AsyncStorage$mergeIt !== void 0 ? _AsyncStorage$mergeIt : Promise.reject('Not implemented'); | ||
}); | ||
const promises = keyValuePairs.map(item => AsyncStorage.mergeItem(item[0], item[1])); | ||
return createPromiseAll(promises, callback); | ||
@@ -167,0 +163,0 @@ } |
@@ -124,4 +124,2 @@ "use strict"; | ||
* | ||
* **NOTE:** This is not supported by all native implementations. | ||
* | ||
* See https://react-native-async-storage.github.io/async-storage/docs/api#mergeitem | ||
@@ -348,4 +346,2 @@ */ | ||
* | ||
* **NOTE**: This is not supported by all native implementations. | ||
* | ||
* See https://react-native-async-storage.github.io/async-storage/docs/api#multimerge | ||
@@ -368,12 +364,6 @@ */ | ||
}; | ||
})(); // Not all native implementations support merge. | ||
})(); | ||
if (!_RCTAsyncStorage.default.multiMerge) { | ||
delete AsyncStorage.mergeItem; | ||
delete AsyncStorage.multiMerge; | ||
} | ||
var _default = AsyncStorage; | ||
exports.default = _default; | ||
//# sourceMappingURL=AsyncStorage.native.js.map |
@@ -29,4 +29,2 @@ "use strict"; | ||
mergeItem: function () { | ||
var _AsyncStorage$mergeIt, _AsyncStorage$mergeIt2; | ||
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
@@ -36,3 +34,3 @@ args[_key3] = arguments[_key3]; | ||
return (_AsyncStorage$mergeIt = (_AsyncStorage$mergeIt2 = _AsyncStorage.default.mergeItem) === null || _AsyncStorage$mergeIt2 === void 0 ? void 0 : _AsyncStorage$mergeIt2.call(_AsyncStorage.default, key, ...args)) !== null && _AsyncStorage$mergeIt !== void 0 ? _AsyncStorage$mergeIt : Promise.reject('Not implemented'); | ||
return _AsyncStorage.default.mergeItem(key, ...args); | ||
}, | ||
@@ -39,0 +37,0 @@ removeItem: function () { |
@@ -150,7 +150,3 @@ /** | ||
multiMerge: (keyValuePairs, callback) => { | ||
const promises = keyValuePairs.map(item => { | ||
var _AsyncStorage$mergeIt, _AsyncStorage$mergeIt2; | ||
return (_AsyncStorage$mergeIt = (_AsyncStorage$mergeIt2 = AsyncStorage.mergeItem) === null || _AsyncStorage$mergeIt2 === void 0 ? void 0 : _AsyncStorage$mergeIt2.call(AsyncStorage, item[0], item[1])) !== null && _AsyncStorage$mergeIt !== void 0 ? _AsyncStorage$mergeIt : Promise.reject('Not implemented'); | ||
}); | ||
const promises = keyValuePairs.map(item => AsyncStorage.mergeItem(item[0], item[1])); | ||
return createPromiseAll(promises, callback); | ||
@@ -157,0 +153,0 @@ } |
@@ -111,4 +111,2 @@ /** | ||
* | ||
* **NOTE:** This is not supported by all native implementations. | ||
* | ||
* See https://react-native-async-storage.github.io/async-storage/docs/api#mergeitem | ||
@@ -331,4 +329,2 @@ */ | ||
* | ||
* **NOTE**: This is not supported by all native implementations. | ||
* | ||
* See https://react-native-async-storage.github.io/async-storage/docs/api#multimerge | ||
@@ -351,11 +347,5 @@ */ | ||
}; | ||
})(); // Not all native implementations support merge. | ||
})(); | ||
if (!RCTAsyncStorage.multiMerge) { | ||
delete AsyncStorage.mergeItem; | ||
delete AsyncStorage.multiMerge; | ||
} | ||
export default AsyncStorage; | ||
//# sourceMappingURL=AsyncStorage.native.js.map |
@@ -19,4 +19,2 @@ import AsyncStorage from './AsyncStorage'; | ||
mergeItem: function () { | ||
var _AsyncStorage$mergeIt, _AsyncStorage$mergeIt2; | ||
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
@@ -26,3 +24,3 @@ args[_key3] = arguments[_key3]; | ||
return (_AsyncStorage$mergeIt = (_AsyncStorage$mergeIt2 = AsyncStorage.mergeItem) === null || _AsyncStorage$mergeIt2 === void 0 ? void 0 : _AsyncStorage$mergeIt2.call(AsyncStorage, key, ...args)) !== null && _AsyncStorage$mergeIt !== void 0 ? _AsyncStorage$mergeIt : Promise.reject('Not implemented'); | ||
return AsyncStorage.mergeItem(key, ...args); | ||
}, | ||
@@ -29,0 +27,0 @@ removeItem: function () { |
@@ -53,7 +53,5 @@ export declare type ErrorLike = { | ||
* | ||
* **NOTE:** This is not supported by all native implementations. | ||
* | ||
* See https://react-native-async-storage.github.io/async-storage/docs/api#mergeitem | ||
*/ | ||
mergeItem?: (key: string, value: string, callback?: Callback) => Promise<void>; | ||
mergeItem: (key: string, value: string, callback?: Callback) => Promise<void>; | ||
/** | ||
@@ -113,7 +111,5 @@ * Erases *all* `AsyncStorage` for all clients, libraries, etc. You probably | ||
* | ||
* **NOTE**: This is not supported by all native implementations. | ||
* | ||
* See https://react-native-async-storage.github.io/async-storage/docs/api#multimerge | ||
*/ | ||
multiMerge?: (keyValuePairs: [string, string][], callback?: MultiCallback) => Promise<void>; | ||
multiMerge: (keyValuePairs: [string, string][], callback?: MultiCallback) => Promise<void>; | ||
}; |
{ | ||
"name": "@react-native-async-storage/async-storage", | ||
"version": "1.17.7", | ||
"version": "1.17.8", | ||
"description": "Asynchronous, persistent, key-value storage system for React Native.", | ||
@@ -123,3 +123,6 @@ "main": "lib/commonjs/index.js", | ||
"device": { | ||
"avdName": "Emu_E2E" | ||
"avdName": "E2E_API_30", | ||
"utilBinaryPaths": [ | ||
"/var/tmp/test-butler.apk" | ||
] | ||
} | ||
@@ -132,3 +135,6 @@ }, | ||
"device": { | ||
"avdName": "Emu_E2E" | ||
"avdName": "E2E_API_30", | ||
"utilBinaryPaths": [ | ||
"/var/tmp/test-butler.apk" | ||
] | ||
} | ||
@@ -135,0 +141,0 @@ } |
@@ -121,4 +121,2 @@ /** | ||
* | ||
* **NOTE:** This is not supported by all native implementations. | ||
* | ||
* See https://react-native-async-storage.github.io/async-storage/docs/api#mergeitem | ||
@@ -341,4 +339,2 @@ */ | ||
* | ||
* **NOTE**: This is not supported by all native implementations. | ||
* | ||
* See https://react-native-async-storage.github.io/async-storage/docs/api#multimerge | ||
@@ -362,8 +358,2 @@ */ | ||
// Not all native implementations support merge. | ||
if (!RCTAsyncStorage.multiMerge) { | ||
delete AsyncStorage.mergeItem; | ||
delete AsyncStorage.multiMerge; | ||
} | ||
export default AsyncStorage; |
@@ -166,6 +166,4 @@ /** | ||
multiMerge: (keyValuePairs, callback) => { | ||
const promises = keyValuePairs.map( | ||
(item) => | ||
AsyncStorage.mergeItem?.(item[0], item[1]) ?? | ||
Promise.reject('Not implemented') | ||
const promises = keyValuePairs.map((item) => | ||
AsyncStorage.mergeItem(item[0], item[1]) | ||
); | ||
@@ -172,0 +170,0 @@ return createPromiseAll(promises, callback); |
@@ -8,7 +8,5 @@ import AsyncStorage from './AsyncStorage'; | ||
setItem: (...args) => AsyncStorage.setItem(key, ...args), | ||
mergeItem: (...args) => | ||
AsyncStorage.mergeItem?.(key, ...args) ?? | ||
Promise.reject('Not implemented'), | ||
mergeItem: (...args) => AsyncStorage.mergeItem(key, ...args), | ||
removeItem: (...args) => AsyncStorage.removeItem(key, ...args), | ||
}; | ||
} |
@@ -73,11 +73,5 @@ export type ErrorLike = { | ||
* | ||
* **NOTE:** This is not supported by all native implementations. | ||
* | ||
* See https://react-native-async-storage.github.io/async-storage/docs/api#mergeitem | ||
*/ | ||
mergeItem?: ( | ||
key: string, | ||
value: string, | ||
callback?: Callback | ||
) => Promise<void>; | ||
mergeItem: (key: string, value: string, callback?: Callback) => Promise<void>; | ||
@@ -156,7 +150,5 @@ /** | ||
* | ||
* **NOTE**: This is not supported by all native implementations. | ||
* | ||
* See https://react-native-async-storage.github.io/async-storage/docs/api#multimerge | ||
*/ | ||
multiMerge?: ( | ||
multiMerge: ( | ||
keyValuePairs: [string, string][], | ||
@@ -163,0 +155,0 @@ callback?: MultiCallback |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
397412
2169