npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reactive-cache/debugger

v1.2.0

Published

debugger for reactive-cache

Readme

@reactive-cache/debugger

A visual debugging tool for @reactive-cache/core that provides a real-time UI panel to inspect and modify cached values during development.

Installation

npm install @reactive-cache/debugger

Features

  • Real-time visualization of all reactive cache values
  • Edit cache values directly from the UI panel
  • Support for primitives, objects, arrays, and null values
  • JSON editor for complex objects
  • Object editor fallback for non-serializable objects
  • Automatic UI updates when cache values change
  • Fixed position panel (bottom-right) or custom container placement
  • Built with Tweakpane

Usage

Basic Setup

import { ReactiveCacheDebugger } from '@reactive-cache/debugger';

const debugger = new ReactiveCacheDebugger();

// Initialize in development mode
debugger.init({
  isDev: process.env.NODE_ENV === 'development'
});

With Custom Container

import { ReactiveCacheDebugger } from '@reactive-cache/debugger';

const debugger = new ReactiveCacheDebugger();
const container = document.getElementById('debug-panel');

debugger.init({
  isDev: true,
  container: container
});

Cleanup

// Dispose when no longer needed (e.g., component unmount)
debugger.dispose();

API

ReactiveCacheDebugger

Methods

| Method | Description | |--------|-------------| | init(params: ReactiveCacheDebuggerParams) | Initializes the debugger panel | | dispose() | Cleans up subscriptions and removes the panel |

ReactiveCacheDebuggerParams

| Property | Type | Required | Description | |----------|------|----------|-------------| | isDev | boolean | Yes | Enable/disable the debugger. Set to false in production to disable. | | container | HTMLElement | No | Custom container element. If not provided, creates a fixed panel at bottom-right. |

Examples

React Integration

import { useEffect } from 'react';
import { ReactiveCacheDebugger } from '@reactive-cache/debugger';

function App() {
  useEffect(() => {
    const debugger = new ReactiveCacheDebugger();
    debugger.init({ isDev: import.meta.env.DEV });

    return () => debugger.dispose();
  }, []);

  return <div>Your App</div>;
}

Angular Integration

import { Component, OnDestroy, OnInit } from '@angular/core';
import { ReactiveCacheDebugger } from '@reactive-cache/debugger';

@Component({
  selector: 'app-root',
  template: '<router-outlet></router-outlet>'
})
export class AppComponent implements OnInit, OnDestroy {
  private debugger = new ReactiveCacheDebugger();

  ngOnInit() {
    this.debugger.init({ isDev: !environment.production });
  }

  ngOnDestroy() {
    this.debugger.dispose();
  }
}

Vue Integration

<script setup>
import { onMounted, onUnmounted } from 'vue';
import { ReactiveCacheDebugger } from '@reactive-cache/debugger';

const debugger = new ReactiveCacheDebugger();

onMounted(() => {
  debugger.init({ isDev: import.meta.env.DEV });
});

onUnmounted(() => {
  debugger.dispose();
});
</script>

Embedded Panel

const debugger = new ReactiveCacheDebugger();
const sidebar = document.querySelector('.sidebar');

debugger.init({
  isDev: true,
  container: sidebar  // Panel will be embedded in sidebar, expanded by default
});

How It Works

  1. When initialized in dev mode, the debugger subscribes to @reactive-cache/core's internal cache list
  2. It creates a Tweakpane UI panel that displays all registered caches
  3. Cache values are rendered based on their type:
    • Primitives (string, number, boolean): Direct input binding
    • Objects/Arrays: JSON editor (falls back to object editor for circular references)
    • null: JSON string input
  4. Changes made in the UI are propagated back to the cache via state.next()
  5. The UI automatically refreshes when cache values change (debounced at 1 second)

Dependencies

License

ISC

Author

Jor-ban