typicode/lowdb
57.9
Adequate · 1 October 2026
366
lines of production code
TypeScript
primary language
2
measurements over time
What this system is
This system is a lightweight, environment-agnostic database library that manages data persistence across Node.js, browsers, and in-memory contexts. It provides a unified API for reading, writing, and updating data through pluggable adapters, supporting both asynchronous and synchronous operations. The library simplifies initialization via presets for common storage mechanisms like JSON files, local storage, and session storage, ensuring data integrity with atomic writes and mandatory default state configuration.
Features
Added example code demonstrating preset usage across environments
New example files have been added to the src/examples directory to show how to use the library's preset system (LocalStoragePreset, JSONFileSyncPreset, JSONFilePreset) in different contexts. These include a CLI example using JSONFileSync, an Express server example using JSONFile, a browser-based example using LocalStorage, and an in-memory example for testing. A README has also been added to list these examples.
src/examples · high confidence
Added in-memory storage adapters
New Memory and MemorySync adapter classes have been added to the adapters module, providing in-memory storage capabilities that implement the core Adapter and SyncAdapter interfaces. These adapters allow data to be read and written to memory rather than a persistent store, with the synchronous variant offering immediate return values for read operations.
src/adapters · high confidence
New browser and node presets for simplified database initialization
Added new preset functions in src/presets to simplify database setup. The browser preset (src/presets/browser.ts) provides LocalStoragePreset and SessionStoragePreset for synchronous browser storage. The node preset (src/presets/node.ts) provides JSONFilePreset and JSONFileSyncPreset for file-based storage, with automatic switching to in-memory adapters during tests.
src/presets · high confidence
New file and storage adapters for Node.js and browser environments
This change introduces new adapter implementations for data persistence. In the Node.js environment, it adds TextFile and JSONFile adapters (both async and sync variants) for reading and writing data to disk, utilizing the 'steno' library for atomic writes and temporary file renaming to ensure data integrity. In the browser environment, it adds WebStorage, LocalStorage, and SessionStorage adapters to persist data in the browser's storage APIs. These adapters implement the core SyncAdapter and Adapter interfaces, providing a consistent API for data access across different runtime environments.
src/adapters/node · high confidence
Removals
Removed benchmark scripts and documentation
The benchmarking tooling has been removed from the project. The \benchmark/index.js\ file, which previously executed performance tests for insert, get, update, and remove operations using the \low\ library, has been deleted. Additionally, the \benchmark/README.md\ file containing instructions on how to run these benchmarks has been removed.
benchmark · high confidence
Behavioural changes
Enforced commit message linting and pre-commit checks
The development workflow now automatically validates commit messages using commitlint and runs linting and tests before every commit. This ensures code quality and consistent commit history by preventing commits that do not meet the defined standards or fail tests.
.husky · high confidence
Introduction of Low and LowSync core classes with mandatory default data
The core library now exposes \Low\ (async) and \LowSync\ (synchronous) classes that wrap data adapters. A key behavioral change is that the \defaultData\ parameter is now mandatory in the constructor; omitting it throws an error, ensuring the instance always has a defined initial state. These classes provide \read\, \write\, and \update\ methods to manage data persistence through the provided adapter, replacing previous instantiation patterns that may have allowed undefined default data.
src/core · high confidence
Major rewrite to modern TypeScript and ESM architecture
The project has been completely rewritten from CoffeeScript to TypeScript, adopting a pure ESM module structure and modern build tooling. This change replaces the legacy Grunt/CoffeeScript build pipeline with a TypeScript configuration and removes the old \.npmignore\ and \.travis.yml\ files. For users, this means the API has shifted from the legacy underscore-style chaining to a simpler, promise-based API using presets like \JSONFilePreset\, requiring an update to how the database is initialized and data is persisted.
(repo-wide) · high confidence
Restructured exports and removed CoffeeScript source
The library's entry points have been reorganized into distinct modules for browser, Node.js, and general usage, explicitly exporting specific adapters (LocalStorage, SessionStorage, DataFile, JSONFile, TextFile) and presets alongside the core Low class. The previous unified CoffeeScript implementation (src/index.coffee) has been removed in favor of this new TypeScript-based structure.
src · high confidence
Test coverage
Removal of legacy CoffeeScript test suite
The test suite located at test/index.coffee has been removed. This file contained the original CoffeeScript-based tests for the core library functionality, including verification of data manipulation methods (insert, update, remove), event emission, file I/O operations (load, save), and the short syntax API. Its deletion indicates a migration away from this specific test implementation.
test · high confidence
Dependencies
lowdb v7.0.1: Major rewrite to ESM, TypeScript, and Node 18+ requirement
This update introduces lowdb version 7.0.1, a significant architectural shift that drops support for Node versions prior to 18 and rewrites the library as an ES Module using TypeScript. The dependency on the legacy \underscore.db\ and older \lodash\ versions has been replaced by \steno\ for file writing, while development tooling has been modernized to include \eslint\, \husky\, and \@commitlint\. For users, this means the library now supports modern ESM imports with specific subpath exports for Node and browser environments, provides built-in TypeScript definitions, and requires a newer Node runtime.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 62 → 58 (-4.6)
- Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 96 → 96 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 61 → 61 (+0.0)
- Readiness 57 → 43 (-13.5)
- Security 74 → 84 (+10.5)
- Performance 100 (new)
Resolved (4)
- Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (no pnpm-resolved versions to grade)
- Documentation: no contributor guidance (README.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
typicode/lowdb was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 8a6fce9b72f769b22533f0979fbc2e73180f8112 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.