diff --git a/docs/2.drivers/azure.md b/docs/2.drivers/azure.md index 11b6c279..34fb038e 100644 --- a/docs/2.drivers/azure.md +++ b/docs/2.drivers/azure.md @@ -10,6 +10,8 @@ Store data in the key-value store of Azure App Configuration. ### Usage +**Driver name:** `azure` + ::note{to="https://learn.microsoft.com/en-us/azure/azure-app-configuration/overview"} Learn more about Azure App Configuration. :: diff --git a/docs/2.drivers/browser.md b/docs/2.drivers/browser.md index 382ef873..269b111b 100644 --- a/docs/2.drivers/browser.md +++ b/docs/2.drivers/browser.md @@ -10,6 +10,8 @@ icon: ph:browser-thin ### Usage +**Driver name:** `localstorage` or `sessionstorage` + Store data in [localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) or [sessionStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage.) ```js @@ -34,6 +36,8 @@ Store key-value in IndexedDB. ### Usage +**Driver name:** `indexeddb` + ::read-more{to="https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API"} Learn more about IndexedDB. :: diff --git a/docs/2.drivers/capacitor-preferences.md b/docs/2.drivers/capacitor-preferences.md index 1ccf08a8..92ae5f88 100644 --- a/docs/2.drivers/capacitor-preferences.md +++ b/docs/2.drivers/capacitor-preferences.md @@ -12,6 +12,8 @@ Learn more about Capacitor Preferences API. ## Usage +**Driver name:** `capacitor-preferences` + To use this driver, you need to install and sync `@capacitor/preferences` inside your capacitor project: :pm-install{name="@capacitor/preferences"} diff --git a/docs/2.drivers/cloudflare.md b/docs/2.drivers/cloudflare.md index 344df303..f2577a9a 100644 --- a/docs/2.drivers/cloudflare.md +++ b/docs/2.drivers/cloudflare.md @@ -12,6 +12,8 @@ icon: devicon-plain:cloudflareworkers ### Usage +**Driver name:** `cloudflare-kv-binding` + ::read-more{to="https://developers.cloudflare.com/workers/runtime-apis/kv"} Learn more about Cloudflare KV. :: @@ -54,6 +56,8 @@ const storage = createStorage({ ### Usage +**Driver name:** `cloudflare-kv-http` + ::read-more{to="https://developers.cloudflare.com/api/operations/workers-kv-namespace-list-namespaces"} Learn more about Cloudflare KV API. :: @@ -127,6 +131,10 @@ const storage = createStorage({ This is an experimental driver! This driver only works in a cloudflare worker environment and cannot be used in other runtime environments such as Node.js (r2-http driver is coming soon) :: +### Usage + +**Driver name:** `cloudflare-r2-binding` + ::read-more{to="https://developers.cloudflare.com/r2/api/workers/workers-api-reference/"} Learn more about Cloudflare R2 buckets. :: diff --git a/docs/2.drivers/database.md b/docs/2.drivers/database.md index 815eff00..3a5e5da8 100644 --- a/docs/2.drivers/database.md +++ b/docs/2.drivers/database.md @@ -8,6 +8,8 @@ icon: ph:database ## Usage +**Driver name:** `db0` + This driver stores KV data in any SQL database using [db0](https://db0.unjs.io). ::warning diff --git a/docs/2.drivers/deno.md b/docs/2.drivers/deno.md index 1b4f3bca..ae904eac 100644 --- a/docs/2.drivers/deno.md +++ b/docs/2.drivers/deno.md @@ -12,6 +12,8 @@ Learn more about Deno KV. ## Usage (Deno) +**Driver name:** `deno-kv` + ::important `deno-kv` driver requires [Deno deploy](https://docs.deno.com/deploy/kv/manual/on_deploy/) or [Deno runtime](https://docs.deno.com/runtime/) with `--unstable-kv` CLI flag. See [Node.js](#usage-nodejs) section for other runtimes. :: @@ -40,6 +42,8 @@ const storage = createStorage({ ## Usage (Node.js) +**Driver name:** `deno-kv-node` + Deno provides [`@deno/kv`](https://www.npmjs.com/package/@deno/kv) npm package, A Deno KV client library optimized for Node.js. - Access [Deno Deploy](https://deno.com/deploy) remote databases (or any diff --git a/docs/2.drivers/fs.md b/docs/2.drivers/fs.md index 18457371..f227d3e5 100644 --- a/docs/2.drivers/fs.md +++ b/docs/2.drivers/fs.md @@ -8,6 +8,8 @@ icon: ph:file-light ## Usage +**Driver name:** `fs` or `fs-lite` + Maps data to the real filesystem using directory structure for nested keys. Supports watching using [chokidar](https://github.com/paulmillr/chokidar). This driver implements meta for each key including `mtime` (last modified time), `atime` (last access time), and `size` (file size) using `fs.stat`. diff --git a/docs/2.drivers/github.md b/docs/2.drivers/github.md index 3dce9648..d9b4b0ff 100644 --- a/docs/2.drivers/github.md +++ b/docs/2.drivers/github.md @@ -8,6 +8,8 @@ icon: mdi:github ## Usage +**Driver name:** `github` + This driver fetches all possible keys once and keep it in cache for 10 minutes. Due to GitHub rate limit, it is highly recommended to provide a token. It only applies to fetching keys. ```js diff --git a/docs/2.drivers/http.md b/docs/2.drivers/http.md index 37367f3d..85d47cc5 100644 --- a/docs/2.drivers/http.md +++ b/docs/2.drivers/http.md @@ -8,6 +8,8 @@ icon: ic:baseline-http ## Usage +**Driver name:** `http` + ::note Supports built-in [http server](/guide/http-server) methods. :: diff --git a/docs/2.drivers/lru-cache.md b/docs/2.drivers/lru-cache.md index e9992503..dece30ef 100644 --- a/docs/2.drivers/lru-cache.md +++ b/docs/2.drivers/lru-cache.md @@ -8,6 +8,8 @@ icon: material-symbols:cached-rounded ## Usage +**Driver name:** `lru-cache` + Keeps cached data in memory using [LRU Cache](https://www.npmjs.com/package/lru-cache). See [`lru-cache`](https://www.npmjs.com/package/lru-cache) for supported options. diff --git a/docs/2.drivers/memory.md b/docs/2.drivers/memory.md index 667aebc4..81e0bb89 100644 --- a/docs/2.drivers/memory.md +++ b/docs/2.drivers/memory.md @@ -8,6 +8,10 @@ icon: bi:memory Keeps data in memory using [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map). (default storage) +## Usage + +**Driver name:** `memory` + ::note By default, it is mounted at the top level, so it's unlikely that you will need to mount it again. :: diff --git a/docs/2.drivers/mongodb.md b/docs/2.drivers/mongodb.md index 94c8a864..3d138359 100644 --- a/docs/2.drivers/mongodb.md +++ b/docs/2.drivers/mongodb.md @@ -8,6 +8,8 @@ icon: teenyicons:mongodb-outline ## Usage +**Driver name:** `mongodb` + ::read-more{to="https://www.mongodb.com/"} Learn more about MongoDB. :: diff --git a/docs/2.drivers/netlify.md b/docs/2.drivers/netlify.md index 94bf25d5..6808900b 100644 --- a/docs/2.drivers/netlify.md +++ b/docs/2.drivers/netlify.md @@ -13,6 +13,8 @@ Store data in a [Netlify Blobs](https://docs.netlify.com/blobs/overview/) store. ## Usage +**Driver name:** `netlify-blobs` + ```js import { createStorage } from "unstorage"; import netlifyBlobsDriver from "unstorage/drivers/netlify-blobs"; diff --git a/docs/2.drivers/null.md b/docs/2.drivers/null.md index d4bc8dba..ccb53c7b 100644 --- a/docs/2.drivers/null.md +++ b/docs/2.drivers/null.md @@ -10,6 +10,10 @@ icon: bi:trash3-fill This driver does NOT store any data. It will discard any data written to it and will always return null similar to [`/dev/null`](https://en.wikipedia.org/wiki/Null_device) :: +## Usage + +**Driver name:** `null` + ```js import { createStorage } from "unstorage"; import nullDriver from "unstorage/drivers/null"; diff --git a/docs/2.drivers/overlay.md b/docs/2.drivers/overlay.md index 9b3f566f..cf5d61c7 100644 --- a/docs/2.drivers/overlay.md +++ b/docs/2.drivers/overlay.md @@ -10,6 +10,10 @@ All write operations happen on the top level layer while values are read from al When removing a key, a special value `__OVERLAY_REMOVED__` will be set on the top level layer internally. +## Usage + +**Driver name:** `overlay` + In the example below, we create an in-memory overlay on top of fs. No changes will be actually written to the disk when setting new keys. ```js diff --git a/docs/2.drivers/planetscale.md b/docs/2.drivers/planetscale.md index 55429a2f..5a9f0124 100644 --- a/docs/2.drivers/planetscale.md +++ b/docs/2.drivers/planetscale.md @@ -8,6 +8,8 @@ icon: simple-icons:planetscale ## Usage +**Driver name:** `planetscale` + ::read-more{to="https://docs.microsoft.com/en-us/azure/key-vault/secrets/about-secrets"} Learn more about PlanetScale. :: diff --git a/docs/2.drivers/redis.md b/docs/2.drivers/redis.md index b360f78b..b9cf70ea 100644 --- a/docs/2.drivers/redis.md +++ b/docs/2.drivers/redis.md @@ -8,6 +8,8 @@ icon: simple-icons:redis ## Usage +**Driver name:** `redis` + ::read-more{to="https://redis.com"} Learn more about Redis. :: diff --git a/docs/2.drivers/s3.md b/docs/2.drivers/s3.md index e2947150..232e48c8 100644 --- a/docs/2.drivers/s3.md +++ b/docs/2.drivers/s3.md @@ -10,7 +10,11 @@ S3 driver allows storing KV data to [Amazon S3](https://aws.amazon.com/s3/) or a Driver implementation is lightweight and based on [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) working with Node.js as well as edge workers. -## Setup +## Usage + +**Driver name:** `s3` + +### Setup Setup a "Bucket" in your S3-compatible provider. You need this info: diff --git a/docs/2.drivers/uploadthing.md b/docs/2.drivers/uploadthing.md index fa2d6dec..8a948b38 100644 --- a/docs/2.drivers/uploadthing.md +++ b/docs/2.drivers/uploadthing.md @@ -18,6 +18,8 @@ There is a known issue that same key, if deleted cannot be used again [tracker i ## Usage +**Driver name:** `uploadthing` + To use, you will need to install `uploadthing` dependency in your project: :pm-install{name="uploadthing"} diff --git a/docs/2.drivers/upstash.md b/docs/2.drivers/upstash.md index bc20cff0..5a65739e 100644 --- a/docs/2.drivers/upstash.md +++ b/docs/2.drivers/upstash.md @@ -8,6 +8,8 @@ icon: simple-icons:upstash ## Usage +**Driver name:** `upstash` + ::read-more{to="https://upstash.com/"} Learn more about Upstash. :: diff --git a/docs/2.drivers/vercel.md b/docs/2.drivers/vercel.md index 08a1872c..d95c4091 100644 --- a/docs/2.drivers/vercel.md +++ b/docs/2.drivers/vercel.md @@ -12,6 +12,10 @@ icon: gg:vercel Learn more about Vercel KV. :: +### Usage + +**Driver name:** `vercel-kv` + > [!NOTE] > Please check [Vercel KV Limits](https://vercel.com/docs/storage/vercel-kv/limits). @@ -63,6 +67,10 @@ Learn more about Vercel Blob. Currently Vercel Blob stores all data with public access. :: +### Usage + +**Driver name:** `vercel-blob` + To use, you will need to install [`@vercel/blob`](https://www.npmjs.com/package/@vercel/blob) dependency in your project: :pm-install{name="@vercel/blob"}