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

debugger-core

v1.0.2

Published

A TypeScript library for tracking and debugging web applications. Supports both npm package and CDN usage.

Readme

debugger-core

A TypeScript library for tracking and debugging web applications. Supports both npm package and CDN usage.

Installation

As an npm package

npm install debugger-core

Via CDN

<script src="https://unpkg.com/debugger-core/dist/core.min.js"></script>

Usage

NPM Package Usage

// ES6 modules
import { init } from 'debugger-core';

// CommonJS
const { init } = require('debugger-core');

// Initialize the debugger
init({
  eventsAPIUrl: 'https://your-api-endpoint.com/events',
  sid: 'session-id', // optional
  uid: 'user-id', // optional
  channel: 'web', // optional, defaults to 'core'
});

CDN Usage

<!DOCTYPE html>
<html>
  <head>
    <title>Project Debugger Example</title>
  </head>
  <body>
    <h1>Hello World</h1>

    <script src="https://unpkg.com/debugger-core/dist/core.min.js"></script>
    <script>
      // The library is available as ProjectDebuggerCore
      ProjectDebuggerCore.init({
        eventsAPIUrl: 'https://your-api-endpoint.com/events',
        sid: 'session-id', // optional
        uid: 'user-id', // optional
        channel: 'web', // optional, defaults to 'core'
      });
    </script>
  </body>
</html>

API Reference

init(options)

Initializes the project debugger with the specified configuration.

Parameters

  • options (Object)
    • eventsAPIUrl (string, required): The URL endpoint where events will be sent
    • sid (string, optional): Session ID for tracking
    • uid (string, optional): User ID for tracking
    • channel (string, optional): Channel identifier, defaults to 'core'

Example

import { init } from 'debugger-core';

init({
  eventsAPIUrl: 'https://api.example.com/events',
  sid: 'session-123',
  uid: 'user-456',
  channel: 'production',
});

Features

  • API Call Tracking: Automatically tracks and logs API calls
  • Console Log Recording: Captures console.log, console.error, etc.
  • DOM Updates: Records DOM changes and updates
  • Session Management: Built-in session tracking
  • Flexible Deployment: Works as both npm package and CDN script

Development

Building

# Install dependencies
npm install

# Build for production
npm run build

# Build in watch mode
npm run build:watch

# Type checking
npm run type-check

# Linting
npm run lint

# Testing
npm test

Build Outputs

The build process generates multiple outputs:

  • dist/esm/index.js - ES modules for modern bundlers
  • dist/cjs/index.js - CommonJS for Node.js
  • dist/types/index.d.ts - TypeScript declarations
  • dist/core.min.js - Minified UMD bundle for CDN

License

MIT