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

@koderlabs/tasks-sdk-web-errors

v0.2.0

Published

Browser error capture for the InstantTasks SDK — window.onerror + unhandledrejection + console breadcrumbs.

Readme

@koderlabs/tasks-sdk-web-errors

Runtime: browser DOM only. For RN errors use @koderlabs/tasks-sdk-rn (which bundles its own ErrorUtils-based capture). For Node use @koderlabs/tasks-sdk-nestjs or process.on('uncaughtException').

Auto-captures uncaught JS errors, unhandled promise rejections, and (optionally) console messages from the browser. Attaches breadcrumbs, user info, feature flags, contexts, and the last N network entries (when paired with @koderlabs/tasks-sdk-web-network).

Registered as an integration against the core SDK client.

Install

npm install @koderlabs/tasks-sdk @koderlabs/tasks-sdk-web-errors
# or
pnpm add @koderlabs/tasks-sdk @koderlabs/tasks-sdk-web-errors
# or
yarn add @koderlabs/tasks-sdk @koderlabs/tasks-sdk-web-errors

Usage

import { init } from '@koderlabs/tasks-sdk';
import { errorsIntegration, notify, leaveBreadcrumb, setUser } from '@koderlabs/tasks-sdk-web-errors';

init({
  projectId: 'FE',
  accessKey: 'sk_live_…',
  integrations: [
    errorsIntegration({
      captureGlobalErrors: true,
      captureUnhandledRejections: true,
      captureConsole: false,
      maxBreadcrumbs: 50,
    }),
  ],
});

setUser({ id: 'u_123', email: '[email protected]' });
leaveBreadcrumb('Opened settings modal', 'info', 'user');

try { riskyThing(); } catch (e) { notify(e); }

errorsIntegration(opts)

| Option | Type | Default | Notes | |---|---|---|---| | captureGlobalErrors | boolean | true | Hook window.onerror. | | captureUnhandledRejections | boolean | true | Hook window.onunhandledrejection. | | captureConsole | boolean | false | Intercept console.error/warn as events. Also emits matching breadcrumbs. | | maxBreadcrumbs | number | 50 | Ring-buffer size. | | beforeSend | (event) => event \| null | — | Sync only. Return null to drop. |

Module-level helpers

These operate on the singleton state established by errorsIntegration().setup(). They are safe to import anywhere — they no-op when the integration is not active.

| Export | Purpose | |---|---| | notify(err, { level? }) | Manually capture an Error \| string. level: 'error' \| 'warning' \| 'info' (default error). | | leaveBreadcrumb(message, level?, category?, data?) | Append breadcrumb. | | setUser(user \| null) | Attach user info to subsequent events. | | addFeatureFlag(name, variant) | Tag events with active flag/variant. | | clearFeatureFlag(name) | Remove a flag. | | setContext(key, value \| null) | Add/replace/remove a context block. | | BreadcrumbRing | Class — exposed for advanced ring access. | | parseStack(error) | Stack-frame parser used internally. |

Integration with web-network

When @koderlabs/tasks-sdk-web-network is registered alongside this package, the last N network entries are attached to every error event automatically — no extra wiring. The network package calls _registerNetworkRing on this module to expose its ring buffer.

Caveats

  • Uses module-level singleton state — only one active errors integration per page. Re-init via init() tears the prior one down cleanly.
  • captureConsole: true will capture errors logged by your own logger / 3rd-party libs; expect higher volume.
  • notify() never throws. If the integration isn't set up yet the call silently no-ops.
  • beforeSend here is synchronous (unlike the core SDK beforeSend which can be async).
  • Stack-frame parsing is regex-based and best-effort. Symbol resolution requires uploading source maps (see @koderlabs/tasks-sdk-nextjs or @koderlabs/tasks-cli).

Suite overview

Full SDK suite map + platform availability matrix: docs/sdk/overview.md.

License

KoderLabs proprietary. See LICENSE for terms. Use of this package requires a separate signed written agreement with KoderLabs; access alone confers no rights.

Licensing inquiries: [email protected]