pouchdb-adapter-asyncstorage

6.4.1 • Public • Published

Logo

pouchdb-adapter-asyncstorage

PouchDB adapter using AsyncStorage as its data store. Designed to run in ReactNative. Its adapter name is 'asyncstorage'.

bitHound Overall Score npm Package npm Package travis-ci.org js-standard-style license

Usage

npm install pouchdb-adapter-asyncstorage --save
import PouchDB from 'pouchdb-core'
PouchDB.plugin(require('pouchdb-adapter-asyncstorage').default)
const db = new PouchDB('mydb', {adapter: 'asyncstorage'})
 
// use PouchDB
db.get('4711')
  .then(doc => console.log(doc))
 

Android limit

On Android asyncstorage has a limitation of 6 MB per default, you might want to increase it

// MainApplication.getPackages() 
long size = 50L * 1024L * 1024L; // 50 MB 
com.facebook.react.modules.storage.ReactDatabaseSupplier.getInstance(getApplicationContext()).setMaximumSize(size);

For full API documentation and guides on PouchDB, see PouchDB.com. For details on PouchDB sub-packages, see the Custom Builds documentation.


Twitter URL GitHub stars

Dependencies (13)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i pouchdb-adapter-asyncstorage

    Weekly Downloads

    307

    Version

    6.4.1

    License

    MIT

    Unpacked Size

    32.6 kB

    Total Files

    18

    Last publish

    Collaborators

    • stockulus
    • seigel