https://github.com/3rd-eden/asyncstorageapi
AsyncStorage API, but backed by a Map instance instead of a database, for testing and cross platform support.
https://github.com/3rd-eden/asyncstorageapi
async-storage asyncstorage react react-native
Last synced: 24 days ago
JSON representation
AsyncStorage API, but backed by a Map instance instead of a database, for testing and cross platform support.
- Host: GitHub
- URL: https://github.com/3rd-eden/asyncstorageapi
- Owner: 3rd-Eden
- License: mit
- Created: 2018-12-31T14:41:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-01T13:45:23.000Z (over 7 years ago)
- Last Synced: 2025-02-10T16:18:24.897Z (over 1 year ago)
- Topics: async-storage, asyncstorage, react, react-native
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AsyncStorageApi
The `AsyncStorage` API of React-Native, now backed by a `new Map()` instance,
so it can be ran in any JavaScript environment and as mock for your tests.
## Installation
```
npm install --save asyncstorageapi
```
## Usage
Exactly the same as: https://facebook.github.io/react-native/docs/asyncstorage
With the following exceptions:
- `flushGetRequests` it exists, but does absolutely nothing.
Everything else should work as intended or be considered a bug in this
implementation.
- All methods are truely async.
- Supports Promise and callback based patterns.
- Merging of Objects is done deeply.
- The returned `AsyncStorage` instance is an `object`
- The `AsyncStorage` object only exposes the API methods, nothing more.
## License
MIT