Unstorage
💾 Unstorage provides an async Key-Value storage API with conventional features like multi driver mounting, watching and working with metadata, dozens of built-in drivers and a tiny core.
Install / Use
/learn @unjs/UnstorageREADME
💾 Unstorage
<!--[![Github Actions][github-actions-src]][github-actions-href]-->Unstorage provides an async Key-Value storage API with conventional features like multi driver mounting, watching and working with metadata, dozens of built-in drivers and a tiny core.
Features
- Designed for all environments: Browser, NodeJS, and Workers
- Lots of Built-in drivers
- Asynchronous API
- Unix-style driver mounting to combine storages
- Default in-memory storage
- Tree-shakable utils and tiny core
- Auto JSON value serialization and deserialization
- Binary and raw value support
- State snapshots and hydration
- Storage watcher
- HTTP Storage with built-in server
Usage
Install unstorage npm package:
# yarn
yarn add unstorage
# npm
npm install unstorage
# pnpm
pnpm add unstorage
import { createStorage } from "unstorage";
const storage = createStorage(/* opts */);
await storage.getItem("foo:bar"); // or storage.getItem('/foo/bar')
👉 Check out the the documentation for usage information.
Nightly release channel
You can use the nightly release channel to try the latest changes in the main branch via unstorage-nightly.
If directly using unstorage in your project:
{
"devDependencies": {
"unstorage": "npm:unstorage-nightly"
}
}
If using unstorage via another tool in your project:
{
"resolutions": {
"unstorage": "npm:unstorage-nightly"
}
}
Contribution
- Clone repository
- Install dependencies with
pnpm install - Use
pnpm devto start jest watcher verifying changes - Use
pnpm testbefore pushing to ensure all tests and lint checks passing
License
<!-- Badges -->Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
