This is part of the [ES-Git](https://github.com/es-git/es-git) project.


0.10.010 months ago4 years agoMinified + gzip package size for @es-git/idb-repo in KB



This is part of the ES-Git project.


npm install --save @es-git/idb-repo


This is an implementation of IRawRepo that uses IndexedDB as a storage mechanism. For better async support it is implemented using IDB. This is meant to be used in browsers.

In addition to exporting an implementation of IRawRepo this package also exports an init method.

import Repo, {init} from '@es-git/idb-repo';

const db = await init('my-repository');

const repo = new Repo(db);

init(name? : string) : Promise<DB>

Call this function to create a database that can be used by the repository.

constructor(db : DB)

The constructor takes one argument, an open database.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.