function encodeCursor
Since 0.2.0
encodeCursor(payload: CursorPayload): string

Encode a CursorPayload as a base64url-encoded JSON token.

The token is opaque to the caller: they hand it back verbatim as the next query's cursor, and the adapter decodes it.

Parameters

The values and sort fingerprint to encode

Return Type

string

A base64url-encoded JSON string

Usage

import { encodeCursor } from "common/src/index.ts";