(#3285) - refactor idb changes

Also fix a small thing I noticed with blob support:
if the DB is cached, then we should use the `api._blobSupport`
from the cached DB. Looks like before, we would just assume
no blob support the second time you opened the database.

Also used `utils.Map()` instead of `{}` where
appropriate.
2 files changed
tree: 1c4b9518248dc53edd91205edca6e5691a6954b0
  1. bin/
  2. docs/
  3. lib/
  4. scripts/
  5. tests/
  6. vendor/
  7. .gitignore
  8. .jshintignore
  9. .jshintrc
  10. .npmignore
  11. .travis.yml
  12. bower.json
  13. component.json
  14. CONTRIBUTING.md
  15. LICENSE
  16. package.json
  17. README.md
  18. TESTING.md
README.md

PouchDB - The Javascript Database that Syncs

Build Status

PouchDB was written to help web developers build applications that work as well offline as well as they do online, applications save data locally so the user can use all the features of an app even while offline and synchronise the data between clients so they have up to date data wherever they go.

PouchDB is a free open source project, written in Javascript by these wonderful contributors and inspired by Apache CouchDB.

Using PouchDB

To get started using PouchDB check out our Documentation and the API Documentation.

Contributors

If you want to get involved then check out the contributing guide

Example

var db = new PouchDB('dbname');

db.put({
 _id: 'dave@gmail.com',
 name: 'David',
 age: 66
});

db.changes().on('change', function() {
  console.log('Ch-Ch-Changes');
});

db.replicate.to('http://example.com/mydb');