// the find
knadh/localStorageDB
A simple database layer for localStorage and sessionStorage for creating structured data in the form of databases and tables
A small wrapper around localStorage/sessionStorage that gives you a SQL-ish API (createTable, insert, queryAll, update, deleteRows) over JSON-serialized data. Useful for someone who wants structured client-side storage without pulling in IndexedDB or a real ORM, for small datasets in a browser extension or offline-first toy app.
Zero dependencies and a small, readable source file — easy to audit or fork if you need to patch behavior. The query API covers the basics you'd actually want (filtering via object or callback, sort, limit/offset, distinct) instead of forcing raw key iteration. Ships a .d.ts file so TypeScript consumers get autocomplete without writing their own types.
Mutations aren't committed until you call commit() explicitly, so it's easy to insert/update/delete and lose everything on refresh if you forget the call — there's no transaction wrapper enforcing this. The library keeps data in an in-memory pool and hands back objects/arrays by reference, which the README itself admits causes silent state corruption unless you deep-copy results before mutating them. Test setup still depends on Bower and running an HTML file in a browser by hand — no CI, no headless test runner. Effectively unmaintained: the last real feature/version bump was 2018, and everything after that is packaging noise, so any bug fixes or modern browser quirks are on you.