Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

@nerdalytics/beacon-rewind

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nerdalytics/beacon-rewind

Persist Beacon state. Rewind when you need to.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Beacon Rewind A stylized lighthouse beacon with golden light against a dark blue background, representing the reactive state library

Persist Beacon state. Rewind when you need to.

license:mit registry:npm:version Socket Badge

tech:nodejs language:typescript linter:biome

Persist @nerdalytics/beacon reactive state to SQLite. State changes are automatically saved and restored on restart, with built-in destructive rewind via rewind().

Installation

npm install beacon-rewind --save-exact

Requires Node.js >= 22 and @nerdalytics/beacon as a peer dependency.

Quick Start

import { state } from '@nerdalytics/beacon'
import { BeaconRewind } from 'beacon-rewind'

const db = new BeaconRewind({ databasePath: 'app.sqlite' })
const count = state(0)

// Persist state — restores previous value if it exists
const cleanup = db.persist('count', count)

count.set(1)
count.set(2)
count.set(3)

// Rewind 2 steps: 3 → 2 → 1
db.rewind('count', 2)
console.log(count()) // 1

// Stop persisting and drop the table
cleanup?.()

Documentation

Full documentation, API reference, and examples available at: github.com/nerdalytics/beacon-rewind

License

MIT

Keywords

beacon

FAQs

Package last updated on 08 Feb 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