Skip to main content
Home
This release is 3 versions behind 1.9.1 — the latest version of @fedify/fedify. Jump to latest

Built and signed on GitHub Actions

An ActivityPub/fediverse server framework

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
94%
Published
a month ago (1.8.13)
class WorkersKvStore
implements KvStore

Implementation of the KvStore interface for Cloudflare Workers KV binding. This class provides a wrapper around Cloudflare's KV namespace to store and retrieve JSON-serializable values using structured keys.

Note that this implementation does not support the KvStore.cas operation, as Cloudflare Workers KV does not support atomic compare-and-swap operations. If you need this functionality, consider using a different key–value store that supports atomic operations.

Constructors

new
WorkersKvStore(namespace: KVNamespace<string>)

Methods

delete(key: KvKey): Promise<void>
get<T = unknown>(key: KvKey): Promise<T | undefined>
set(
key: KvKey,
value: unknown,
options?: KvStoreSetOptions,
): Promise<void>

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@fedify/fedify

Import symbol

import { WorkersKvStore } from "@fedify/fedify/x/cfworkers";
or

Import directly with a jsr specifier

import { WorkersKvStore } from "jsr:@fedify/fedify/x/cfworkers";

Add Package

pnpm i jsr:@fedify/fedify
or (using pnpm 10.8 or older)
pnpm dlx jsr add @fedify/fedify

Import symbol

import { WorkersKvStore } from "@fedify/fedify/x/cfworkers";

Add Package

yarn add jsr:@fedify/fedify
or (using Yarn 4.8 or older)
yarn dlx jsr add @fedify/fedify

Import symbol

import { WorkersKvStore } from "@fedify/fedify/x/cfworkers";

Add Package

vlt install jsr:@fedify/fedify

Import symbol

import { WorkersKvStore } from "@fedify/fedify/x/cfworkers";

Add Package

npx jsr add @fedify/fedify

Import symbol

import { WorkersKvStore } from "@fedify/fedify/x/cfworkers";

Add Package

bunx jsr add @fedify/fedify

Import symbol

import { WorkersKvStore } from "@fedify/fedify/x/cfworkers";