@es-git/idb-repo
TypeScript icon, indicating that this package has built-in type declarations

0.10.0 • Public • Published

idb-repo

This is part of the ES-Git project.

Install

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

Usage

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @es-git/idb-repo

Weekly Downloads

7

Version

0.10.0

License

MIT

Unpacked Size

34.8 kB

Total Files

16

Last publish

Collaborators

  • mariusgundersen