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

johnny-cache-inspector

v0.1.7

Published

A slick Cache Storage inspector for React apps. Browse, search, and explore your cached data with ease.

Downloads

22

Readme

Johnny Cache 🎸

A slick Cache Storage inspector for React apps. Browse, search, and explore your cached data with ease.

Johnny Cache Demo

Features

  • Deep JSON Search - Search through all keys and values in your cached data
  • Collapsible JSON Tree - Navigate complex nested objects with syntax highlighting
  • Multiple Caches - Browse all your Cache Storage caches in one place
  • URL Filtering - Quick filter by URL path pattern
  • Copy Support - Copy JSON paths or values with one click
  • Resizable Panel - Drag edges to resize the inspector window
  • Keyboard Shortcuts - ⌘⇧C / Ctrl+Shift+C to toggle

Installation

npm install johnny-cache-inspector
yarn add johnny-cache-inspector
pnpm add johnny-cache-inspector

Usage

Import and add the <CacheInspector /> component to your app. It's recommended to only include it in development:

import { CacheInspector } from 'johnny-cache-inspector';

function App() {
  return (
    <>
      <YourApp />
      {process.env.NODE_ENV === 'development' && <CacheInspector />}
    </>
  );
}

That's it! A small cache icon will appear in the bottom-right corner. Click it to open the inspector.

API

<CacheInspector />

The main component. Renders a floating panel that inspects Cache Storage.

import { CacheInspector } from 'johnny-cache-inspector';

// No props required - just drop it in
<CacheInspector />

useCacheStorage()

A hook to access Cache Storage data programmatically:

import { useCacheStorage } from 'johnny-cache-inspector';

function MyComponent() {
  const { 
    caches,           // Array of cache data
    loading,          // Boolean loading state
    error,            // Error message if any
    refresh,          // Function to reload caches
    getEntryContent,  // Function to get entry JSON content
  } = useCacheStorage();

  // ...
}

Types

import type { CacheEntry, CacheData } from 'johnny-cache-inspector';

interface CacheEntry {
  url: string;
  path: string;
  contentType: string | null;
  size: number | null;
  timestamp: string | null;
  response?: Response;
}

interface CacheData {
  name: string;
  entries: CacheEntry[];
}

Keyboard Shortcuts

| Shortcut | Action | |----------|--------| | ⌘⇧C / Ctrl+Shift+C | Toggle inspector panel | | Escape | Close inspector panel |

Search Modes

JSON Content Search (default)

Searches through all keys and values in your cached JSON data. Matches are highlighted and entries auto-expand to show results.

URL Filter

Quick filter to show only entries matching a URL pattern.

Requirements

  • React 18+ or React 19+
  • Browser with Cache Storage API support

Development

# Install dependencies
npm install

# Run demo app
npm run dev

# Build library
npm run build

# Build demo app
npm run build:demo

License

MIT