finds.dev← search

// the find

typicode/lowdb

★ 22,561 · JavaScript · MIT · updated Mar 2026

Simple and fast JSON database

lowdb is a tiny JSON-file database for Node, Electron, and browser contexts. You get a plain JavaScript object as your data store, read/write it yourself, and the library handles atomic file writes. It's for CLI tools, Electron apps, and prototypes where spinning up Postgres would be absurd overkill.

The adapter pattern is genuinely well-designed — swapping file storage for memory (in tests), localStorage (browser), or a custom remote backend requires zero changes to application code. Atomic writes prevent corrupted JSON on crash or power loss, which is the one real failure mode of this approach. TypeScript support is first-class: the generic type parameter propagates through all methods so you get autocomplete on your data shape without any extra ceremony. Automatically switching to the in-memory adapter during tests is a small touch that saves real friction.

No query primitives whatsoever — you're writing Array.filter() chains by hand, which is fine at 500 records and painful at 50,000. The whole file is serialized on every write, so it degrades badly as data grows and there's no partial-update path. No concurrency story: multiple processes writing the same file will corrupt it, and the docs just say 'don't use cluster'. ESM-only since v6, which still bites anyone with a CommonJS project or a legacy build pipeline.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →