Socket
Book a DemoInstallSign in
Socket

@loro-dev/flock-sqlite

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loro-dev/flock-sqlite

SQLite-backed Flock CRDT replica for Node, browsers, and Cloudflare Workers.

npmnpm
Version
0.6.0
Version published
Weekly downloads
514
6.86%
Maintainers
2
Weekly downloads
 
Created
Source

@loro-dev/flock-sqlite

SQLite-backed implementation of the Flock CRDT surface. This package mirrors the TypeScript bindings while persisting state through unisqlite and stays wire-compatible with the MoonBit-backed bindings.

import { Flock } from "@loro-dev/flock-sqlite";

const flock = await Flock.open({ path: "flock.db" });
await flock.put(["doc", 1], { title: "hello" });
const bundle = await flock.exportJson();

const replica = await Flock.fromJson({ path: "replica.db", bundle });
console.log(await replica.get(["doc", 1])); // { title: "hello" }
await flock.close();
await replica.close();

See prd/003-flock-sqlite.md for the intended semantics (memcomparable keys, export/import, digest, and cross-platform SQLite adapters).

Runtime peers

This adapter relies on unisqlite platform drivers. Install the matching peers for your environment:

  • Node: better-sqlite3
  • Browser: broadcast-channel and @sqlite.org/sqlite-wasm (when loading WASM from npm/CDN)
  • Cloudflare Workers: no extra peers required

Keywords

crdt

FAQs

Package last updated on 03 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts