bun-storage

JSON →
library 2.0.5 ·javascript
verified Jun 7, 2026

bun-storage is a zero-dependency ponyfill for the Web Storage API that uses SQLite to persist data. Version 2.0.5 is the current stable release, maintained as a fast Bun-native alternative to node-localstorage or memory-based implementations. It supports localStorage, sessionStorage, storage events, and optional quota enforcement. Compatible with Bun ≥1.0 and Node ≥20. Released via both npm and JSR, with automatic global injection via 'bun-storage/auto'. It differs from other storage libraries by targeting the Bun runtime, using SQLite for reliable persistence, and exposing both class-based and factory APIs.