Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 8, 2023
1 parent 2a12014 commit 6953532
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions docs/content/5.custom-driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ Explore [src/drivers](https://github.com/unjs/unstorage/tree/main/src/drivers) t
```js
import { createStorage, defineDriver } from "unstorage";

const myStorageDriver = defineDriver((_opts) => {
const myStorageDriver = defineDriver((options) => {
return {
async hasItem(key, opts) {},
async getItem(key, opts) {},
async setItem(key, value, opts) {},
async removeItem(key, opts) {},
async getKeys(base, opts) {},
async clear(base, opts) {},
name: "my-custom-driver",
options,
async hasItem(key, _opts) {},
async getItem(key, _opts) {},
async setItem(key, value, _opts) {},
async removeItem(key, _opts) {},
async getKeys(base, _opts) {},
async clear(base, _opts) {},
async dispose() {},
async watch(callback) {},
};
Expand Down

0 comments on commit 6953532

Please sign in to comment.