Skip to content
This repository was archived by the owner on Sep 18, 2022. It is now read-only.

Repository files navigation

CrudoDb

npm versionnpm 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

constinstance=awaitCrudoDb.setup();constschema: StoreSchema={dbVersion:1,dbName:'test',indices: [{name:'a'},{name:'b'}]};constdao=awaitinstance.applySchema({schema});constentity=awaitdao.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% LinesUncovered Line #s
All files93.2987.591.4594.62
crudodb.ts94.6273.3310094.4494-99,150,213
database.ts93.4995.0688.5295.4854,174,337-338,342-346,358
index.ts10010050100
store-api.ts100100100100
store-schema.ts100100100100
utils.ts89.3981.8290.9191.5329,54-58,71
----------------------------------------------------------------------------------

About

CrudoDb offers a lightweight solution for access data in indexeddb.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages