Skip to content
/ unstorage Public

๐Ÿ’พ 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.

License

Notifications You must be signed in to change notification settings

unjs/unstorage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4d3590a ยท Feb 21, 2025
Feb 19, 2025
Mar 8, 2021
Feb 21, 2025
Dec 18, 2024
Feb 21, 2025
Jan 3, 2025
Mar 7, 2021
Dec 18, 2024
Dec 10, 2024
Dec 18, 2024
Aug 7, 2023
Feb 21, 2025
Nov 15, 2022
Dec 6, 2024
Dec 18, 2024
Dec 6, 2024
Feb 21, 2025
Feb 21, 2025
Dec 18, 2024
Mar 7, 2023
Feb 19, 2025
Feb 28, 2023
Jan 2, 2025
Dec 10, 2024

Repository files navigation

๐Ÿ’พ Unstorage

npm version npm downloads Codecov bundle License

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.

๐Ÿ‘‰ Documentation

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 dev to start jest watcher verifying changes
  • Use pnpm test before pushing to ensure all tests and lint checks passing

License

MIT

About

๐Ÿ’พ 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.

Resources

License

Stars

Watchers

Forks