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

debugfast-js

v1.0.0

Published

Front-end bug catching library for React and Vue applications with comprehensive error context capture

Readme

debugfast-js

Front-end error tracking SDK for React and Vue applications. Captures comprehensive error context including screenshots, console logs, network requests, DOM snapshots, and user actions.

Installation

npm install debugfast-js
# or
pnpm add debugfast-js
# or
yarn add debugfast-js

Quick Start

import { DebugFast } from 'debugfast-js';

DebugFast.init({
  apiEndpoint: 'https://your-api.example.com/v1/events',
  apiKey: 'your-api-key',
});

Framework Integration

React

import { DebugFastErrorBoundary } from 'debugfast-js/react';

function App() {
  return (
    <DebugFastErrorBoundary
      fallback={<div>Something went wrong</div>}
      onError={(error, errorInfo) => console.log(error)}
    >
      <YourApp />
    </DebugFastErrorBoundary>
  );
}

Or use the higher-order component:

import { withDebugFastErrorBoundary } from 'debugfast-js/react';

const SafeComponent = withDebugFastErrorBoundary(MyComponent, {
  fallback: <ErrorFallback />,
});

Vue 3

import { createApp } from 'vue';
import { debugfastPlugin } from 'debugfast-js/vue';
import App from './App.vue';

const app = createApp(App);
app.use(debugfastPlugin, {
  captureComponentInfo: true, // Include Vue component props and route info
});
app.mount('#app');

Composition API helper:

<script setup>
import { useDebugFastErrorHandler } from 'debugfast-js/vue';

const { captureError } = useDebugFastErrorHandler();

function handleRiskyOperation() {
  try {
    // risky code
  } catch (error) {
    captureError(error, { context: 'riskyOperation' });
  }
}
</script>

Configuration

DebugFast.init({
  // Required
  apiEndpoint: 'https://api.example.com/v1/events',
  apiKey: 'your-api-key',

  // Optional - all default to true
  captureScreenshot: true,
  captureConsole: true,
  captureNetwork: true,
  captureDom: true,
  captureUserActions: true,

  // Limits
  screenshotQuality: 0.7,      // 0-1, default: 0.7
  maxConsoleEntries: 50,       // default: 50
  maxNetworkRequests: 20,      // default: 20
  maxUserActions: 30,          // default: 30

  // Privacy
  maskSensitiveInputs: true,   // Mask password fields, etc.

  // Custom context
  tags: { environment: 'production' },
  user: { id: 'user-123', email: '[email protected]' },

  // Hooks
  beforeSend: (report) => {
    // Modify report or return false to cancel
    return report;
  },

  // Debug
  debug: false,
});

API Reference

Static Methods

DebugFast.init(config)

Initialize the SDK. Must be called before any other methods.

DebugFast.captureError(error, options?)

Manually capture an error.

try {
  await riskyOperation();
} catch (error) {
  DebugFast.captureError(error, {
    extra: { operationId: '123' },
    tags: { severity: 'high' },
  });
}

DebugFast.setUser(user)

Set or update user information.

DebugFast.setUser({
  id: 'user-123',
  email: '[email protected]',
  name: 'John Doe',
});

DebugFast.setTags(tags)

Add custom tags to all future error reports.

DebugFast.setTags({
  version: '1.2.3',
  feature: 'checkout',
});

DebugFast.flush()

Flush any pending error reports. Useful before page unload.

window.addEventListener('beforeunload', () => {
  DebugFast.flush();
});

DebugFast.destroy()

Clean up and remove all event listeners.

DebugFast.destroy();

DebugFast.getInstance()

Get the current DebugFast instance (or null if not initialized).

What Gets Captured

Each error report includes:

| Data | Description | |------|-------------| | Error | Message, name, parsed stack trace | | Screenshot | Visual capture of the page at error time | | Browser | Browser, OS, viewport, device type, URL | | Console | Recent console.log/warn/error entries | | Network | Recent fetch/XHR requests with timing | | User Actions | Recent clicks, inputs, navigation | | DOM | HTML snapshot (sensitive inputs masked) | | User | Custom user identification | | Tags | Custom metadata |

Privacy

  • Sensitive inputs (password, credit card, SSN) are automatically masked
  • DOM snapshots redact sensitive field values
  • Use beforeSend hook to filter or redact additional data
  • Screenshot capture can be disabled globally or per-error

Error Sources

Errors are automatically captured from:

  • window.onerror (global errors)
  • window.onunhandledrejection (unhandled promise rejections)
  • React Error Boundaries
  • Vue error handlers

Browser Support

  • Chrome 60+
  • Firefox 55+
  • Safari 12+
  • Edge 79+

Requires crypto.randomUUID() or falls back to polyfill.

TypeScript

Full TypeScript support with exported types:

import type {
  DebugFastConfig,
  ErrorReport,
  CaptureOptions,
  UserInfo,
  StackFrame,
  BrowserInfo,
} from 'debugfast-js';

License

MIT