@storage/deno-kv-fs@0.9.0Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
Deno KV+Filesystem Storage Module
Deno KV+Filesystem Storage Module
See @storage/main for the bigger picture.
This package provides an implementation of the storage module interface.
Combination of a readonly deno-fs and writeable deno-kv, allowing fallback
or immutable storage in the filesystem, and mutable storage via the KV store.
By default the filesystem takes priority, and cannot be overridden by KV values,
unless the env var STORE_PRIMARY is set to kv, in which case the KV always
overrides filesystem values.
Import mapping: "$store": "jsr:@storage/deno-kv-fs"
Example
import * as store from "jsr:@storage/deno-kv-fs"; import { assertEquals } from "jsr:@std/assert"; await store.setItem(["foo", "hello"], "world"); assertEquals(await store.hasItem(["foo", "hello"]), true); assertEquals(await store.getItem(["foo", "hello"]), "world"); await store.clearItems(["foo"]); assertEquals(await store.hasItem(["foo", "hello"]), false);
Built and signed on
GitHub Actions
Add Package
deno add jsr:@storage/deno-kv-fs
Import symbol
import * as deno_kv_fs from "@storage/deno-kv-fs";
Import directly with a jsr specifier
import * as deno_kv_fs from "jsr:@storage/deno-kv-fs";