Skip to content

3rd-Eden/asyncstorageapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

AsyncStorage API, but backed by a Map instance instead of a database, for testing and cross platform support.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published