Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

idb-wrapper

jensarps715.9kMIT1.7.2

A cross-browser wrapper for IndexedDB

storage, offline, IndexedDB

readme

NPM version Dependency Status FOSSA Status

IDBWrapper is a cross-browser wrapper for the HTML5 IndexedDB API. While this API is the future of offline storage, it is not very intuitive to use. IDBWrapper is there to provide easy access to IndexedDB's features.

Browser Support

IDBWrapper works on all browsers supporting the IndexedDB API, which are:

Desktop

Chrome, Firefox, Opera 15+, IE 10+, Safari 8+

Mobile

Chrome for Android, Firefox for Android, Opera for Android, IE10 for WP8, iOS 8+

Worker

IDBWrapper runs inside of a worker on following browsers:

Chrome (also on Android), Firefox (also on Android), Opera (also on Android), IE10+ (also on WP8+)

If using in an older browser supporting WebSql along with IndexedDBShim, IndexedDBShim needs to run first.

Note on limited/buggy IndexedDB support:

Using IDBWrapper

Tutorials

There are two tutorials to get you up and running:

Part 1: Setup and CRUD operations http://jensarps.de/2011/11/25/working-with-idbwrapper-part-1/

Part 2: Running Queries against the store http://jensarps.de/2012/11/13/working-with-idbwrapper-part-2/

Examples

There are some examples to run right in your browser over here: http://jensarps.github.io/IDBWrapper/example/

The source for these examples are in the example folder of this repository.

Wiki

For usage instructions, details about mothods for reading and writing data, setting up indexes and running queries, please refer to the Wiki.

API Reference

There's an API reference over here: http://jensarps.github.io/IDBWrapper/doc/latest/IDBStore.html

For references of older versions, please refer to this index: http://jensarps.github.io/IDBWrapper/doc/

Obtaining IDBWrapper

cdnjs

IDBWrapper is also available on cdnjs. You can directly point a script tag there, or require() it from there. cdnjs supports http, https and spdy, so you can just leave the protocol off. The URLs for the different versions of IDBWrapper can be found here: https://cdnjs.com/libraries/idbwrapper

Package Managers

If you use NPM as your package manager, you can get it from there, too, by running:

$ npm install idb-wrapper

If you use bower as your package manager, run the following:

$ bower install idbwrapper

If you want to add IDBWrapper to a volo project, just run:

$ volo add idbwrapper

git

You can git clone the repository, or download a zip file here: https://github.com/jensarps/IDBWrapper/releases

License

FOSSA Status

changelog

1.7.1 / 2017-11-28

1.7.1 / 2016-08-31

1.7.0 / 2016-04-01

1.6.2 / 2016-03-02

1.6.1 / 2015-11-07

1.6.0 / 2015-10-05

1.5.0 / 2015-04-22

  • Add pagination to query()
  • Add upsertBatch()
  • Add callbacks to deleteDatabase()
  • Stability improvements

1.4.1 / 2013-11-11

  • Support deletion of indexes through constructor arguments
  • Fix issue when using out-of-line keyPath setup with IE10
  • Fix issue when using compound indexes (keyPath sequences)
  • Add integration tests

1.4.0 / 2013-09-24

  • Add .only property to makeKeyRange() options
  • Add getBatch() method
  • Fix bug when calling IDBStore without arguments
  • Fix bug when calling IDBStore with ready callback as only argument
  • Point IDBStore prototype's constructor property to IDBStore
  • Make all methods that open a transaction return this transaction. These methods are: put, get, remove, getAll, clear, batch, putBatch, removeBatch, getBatch, iterate, query and count
  • Stability improvements

1.3.0 / 2013-08-13

  • Make IDBWrapper able to run inside of Workers
  • Add putBatch() and removeBatch() methods
  • Add worker example
  • Move JSHint settings to own config file

1.2.0 / 2013-05-31

  • Add autoContinue option to iterate() method [maxogden]
  • Make put() method work with out-of-line keys [maxogden]
  • Make batch() method work with out-of-line keys [maxogden]
  • Misc Refactoring

1.1.0 / 2013-03-26

  • Move all callbacks from request level to transaction level
  • Misc Refactoring

1.0.0 / 2013-02-05

  • Add query() method
  • Add storePrefix property to constructor [englercj]
  • Add JSDoc
  • Add input checks to the batch() method
  • Add Closure Compiler to repository
  • Add MAKEFILE
  • Misc cleanup

0.3.1 / 2013-01-04

  • lowercase idbstore.js
  • Add minified version
  • Add version property to IDBStore

0.3.0 / 2012-12-18

  • Fix potentially non-unique generated IDs
  • Add batch() method [Raynos]
  • Fix a bug where the success handler could be called even if there was an error
  • Fix a bug where old IndexedDB implementations were not detected successfully

0.2.1 / 2012-11-20

  • Add error handler to constructor
  • Remove support for numeric transaction and cursor types.
  • Misc cleanup

0.2.0 / 2012-11-20

  • Start versioning