1. unstorage
Universal Storage Layer
unstorage
Package: unstorage
Created by: unjs
Last modified: Thu, 14 Mar 2024 12:17:42 GMT
Version: 1.10.2
License: MIT
Downloads: 3,297,686
Repository: https://github.com/unjs/unstorage

Install

npm install unstorage
yarn add unstorage

💾 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.

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

Dependencies

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin