百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
U

unstorage

> 编程语言
开源

Unstorage 提供了一个异步的键值存储 API,具备常规功能,如多驱动挂载、监听和元数据处理,以及数十种内置驱动。

2.6K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Unstorage 提供了一个异步的键值存储 API,具备常规功能,如多驱动挂载、监听和元数据处理,以及数十种内置驱动。

Unstorage

[![npm 版本][npm-version-src]][npm-version-href] [![npm 下载量][npm-downloads-src]][npm-downloads-href] [![Codecov][codecov-src]][codecov-href] [![bundle][bundle-src]][bundle-href] [![许可证][license-src]][license-href] Unstorage 提供了一个异步键值存储 API,具备多驱动挂载、监听、元数据操作等常规功能,内置数十种驱动,并拥有一个微型核心。

功能特性

  • 专为所有环境设计:浏览器、NodeJS 和 Workers
  • 大量内置驱动
  • 异步 API
  • Unix 风格的驱动挂载,以组合存储
  • 默认内存存储
  • 可摇树优化的工具和极简核心
  • 自动 JSON 值序列化和反序列化
  • 支持二进制和原始值
  • 状态快照与水合
  • 存储监视器
  • 带内置服务器的 HTTP 存储

使用方法

安装 unstorage npm 包:

bash
# yarn
yarn add unstorage

# npm
npm install unstorage

# pnpm
pnpm add unstorage
javascript
import { createStorage } from "unstorage";

const storage = createStorage(/* opts */);

await storage.getItem("foo:bar"); // or storage.getItem('/foo/bar')

查看文档以获取使用信息。

夜间发布频道

您可以通过夜间发布频道,使用 unstorage-nightly 来尝试 main 分支中的最新更改。

如果直接在项目中使用 unstorage:

json
{
  "devDependencies": {
    "unstorage": "npm:unstorage-nightly"
  }
}

如果通过项目中的其他工具使用 unstorage:

json
{
  "resolutions": {
    "unstorage": "npm:unstorage-nightly"
  }
}

贡献

  • 克隆仓库
  • 使用 pnpm install 安装依赖
  • 使用 pnpm dev 启动 jest 监视器以验证更改
  • 在推送前使用 pnpm test 确保所有测试和 lint 检查通过

许可证

Documentation MIT [npm-version-src]: https://im

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言