# pouchdb-adapter-asyncstorage

> asyncstorage adapter for PouchDB

Latest version **6.4.1** (published 2018-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install pouchdb-adapter-asyncstorage
pnpm add pouchdb-adapter-asyncstorage
yarn add pouchdb-adapter-asyncstorage
bun add pouchdb-adapter-asyncstorage
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.4.1 |
| Published | 2018-03-22 |
| First published | 2016-06-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 31.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 483 |
| Author | Christoph Stock |
| Maintainers | stockulus |
| Keywords | pouchdb, react-native, asyncstorage, offlinefirst |

## Links

- npm: https://www.npmjs.com/package/pouchdb-adapter-asyncstorage
- Repository: https://github.com/stockulus/pouchdb-react-native
- Homepage: https://github.com/stockulus/pouchdb-react-native#readme
- Issues: https://github.com/stockulus/pouchdb-react-native/issues
- npm.io page: https://npm.io/package/pouchdb-adapter-asyncstorage

## Dependencies (13)

- [atob](https://npm.io/package/atob.md) 2.0.3
- [btoa](https://npm.io/package/btoa.md) 1.1.2
- [buffer](https://npm.io/package/buffer.md) 5.1.0
- [events](https://npm.io/package/events.md) 1.1.1
- [left-pad](https://npm.io/package/left-pad.md) 1.2.0
- [spark-md5](https://npm.io/package/spark-md5.md) 3.0.0
- [pouchdb-json](https://npm.io/package/pouchdb-json.md) 6.4.3
- [blob-polyfill](https://npm.io/package/blob-polyfill.md) 2.0.20171115
- [pouchdb-merge](https://npm.io/package/pouchdb-merge.md) 6.4.3
- [pouchdb-utils](https://npm.io/package/pouchdb-utils.md) 6.4.3
- [pouchdb-errors](https://npm.io/package/pouchdb-errors.md) 6.4.3
- [pouchdb-binary-utils](https://npm.io/package/pouchdb-binary-utils.md) 6.4.3
- [pouchdb-adapter-utils](https://npm.io/package/pouchdb-adapter-utils.md) 6.4.3

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 6.4.1 (latest) — 2018-03-22
- 7.0.0-beta-1 (next) — 2018-08-09
- 6.0.1-beta4 (beta) — 2016-09-07
- 6.4.0 — 2017-12-30
- 6.3.4 — 2017-08-13
- 6.2.6 — 2017-05-30
- 6.2.5 — 2017-05-27
- 6.2.4 — 2017-05-20
- 6.2.3 — 2017-05-10
- 6.2.2 — 2017-05-05
- 6.2.1 — 2017-05-04
- 6.2.0 — 2017-04-22
- 6.1.26 — 2017-02-08
- 6.1.25 — 2017-01-06
- 6.1.24 — 2016-12-26
- … 62 more at https://npm.io/package/pouchdb-adapter-asyncstorage/versions

## README

![Logo](https://raw.githubusercontent.com/stockulus/pouchdb-react-native/master/static/pouchdb-react-native.png)

pouchdb-adapter-asyncstorage
======

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

[![bitHound Overall Score](https://www.bithound.io/github/stockulus/pouchdb-react-native/badges/score.svg)](https://www.bithound.io/github/stockulus/pouchdb-react-native) [![npm Package](https://img.shields.io/npm/dm/pouchdb-adapter-asyncstorage.svg)](https://www.npmjs.com/package/pouchdb-adapter-asyncstorage) [![npm Package](https://img.shields.io/npm/v/pouchdb-adapter-asyncstorage.svg)](https://www.npmjs.com/package/pouchdb-adapter-asyncstorage) [![travis-ci.org](https://travis-ci.org/stockulus/pouchdb-react-native.svg)](https://travis-ci.org/stockulus/pouchdb-react-native) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) [![license](https://img.shields.io/npm/l/pouchdb-adapter-asyncstorage.svg?maxAge=2592000)](https://opensource.org/licenses/MIT)

### Usage

```bash
npm install pouchdb-adapter-asyncstorage --save
```

```js
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

```java
// 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](http://pouchdb.com/). For details on PouchDB sub-packages, see the [Custom Builds documentation](http://pouchdb.com/custom.html).

---
[![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&maxAge=2592000)](https://twitter.com/stockulus) [![GitHub stars](https://img.shields.io/github/stars/stockulus/pouchdb-react-native.svg?style=social&label=Star)](https://github.com/stockulus/pouchdb-react-native)

---
_Source: https://npm.io/package/pouchdb-adapter-asyncstorage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
