2.0.0 • Published 2 years ago

crudodb v2.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
2 years ago

CrudoDb

npm version npm downloads

Offline-first IndexedDb wrapper written in TypeScript, which is able to sync with backend services by passing optional service implementation.

What reason exists for CrudoDb?

CrudoDb allows you to write offline-first webapps without any backend implementation.

In agile Projects, you can implement a PoC without any depend to the backend team.

A small and good tested implementation against fakeindexeddb and (at the moment) local developer tested solution.

Indexeddb internal dbVersion will only incremented if necessary.

Quick greenfield example

const instance = await CrudoDb.setup();

const schema: StoreSchema = {dbVersion:1,dbName:'test', indices: [{name:'a'},{name:'b'}]};

const dao = await instance.applySchema({schema});

const entity = await dao.create({a: '42', b:'666'});

Recommendations

read in documentation for angular and react recommendations.

The Latest Test Coverage (local)

from 2021-05-06

-----------------|---------|----------|---------|---------|---------------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -----------------|---------|----------|---------|---------|---------------------------- All files | 93.29 | 87.5 | 91.45 | 94.62 | crudodb.ts | 94.62 | 73.33 | 100 | 94.44 | 94-99,150,213 database.ts | 93.49 | 95.06 | 88.52 | 95.48 | 54,174,337-338,342-346,358 index.ts | 100 | 100 | 50 | 100 | store-api.ts | 100 | 100 | 100 | 100 | store-schema.ts | 100 | 100 | 100 | 100 | utils.ts | 89.39 | 81.82 | 90.91 | 91.53 | 29,54-58,71 -----------------|---------|----------|---------|---------|----------------------------

2.0.0-next.2

2 years ago

2.0.0

2 years ago

1.2.0

3 years ago

2.0.0-next.1

3 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago