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-network

v0.2.0

Published

Browser network capture for the InstantTasks SDK — fetch + XMLHttpRequest.

Downloads

723

Readme

@koderlabs/tasks-sdk-web-network

Runtime: browser DOM only — patches window.fetch and XMLHttpRequest. For RN network breadcrumbs use the captureNetwork option on @koderlabs/tasks-sdk-rn.

Records the last N HTTP requests (method, URL, status, duration, optional bodies) into a ring buffer. The buffer is attached to error events by @koderlabs/tasks-sdk-web-errors so you can see what the page was doing right before it broke.

By itself this package does not POST anything — it's a passive recorder.

Install

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

Usage

import { init } from '@koderlabs/tasks-sdk';
import { errorsIntegration } from '@koderlabs/tasks-sdk-web-errors';
import { networkIntegration } from '@koderlabs/tasks-sdk-web-network';

init({
  projectId: 'FE',
  accessKey: 'sk_live_…',
  integrations: [
    errorsIntegration(),
    networkIntegration({
      maxEntries: 20,
      recordRequestBody: false,
      recordResponseBody: false,
      ignoreUrls: [/\/sdk\/events$/, 'https://analytics.example.com'],
    }),
  ],
});

networkIntegration(opts)

| Option | Type | Default | Notes | |---|---|---|---| | maxEntries | number | 20 | Ring buffer size. | | recordRequestBody | boolean | false | PII risk — off by default. | | recordResponseBody | boolean | false | PII risk — off by default. | | requestSanitizer | (entry) => entry \| null | — | Mutate or drop before recording. | | responseSanitizer | (entry) => entry \| null | — | Mutate or drop before recording. | | ignoreUrls | Array<string \| RegExp> | [] | Prefix string or RegExp; excludes from capture. |

Returned integration object also exposes getEntries() for manual inspection.

NetworkEntry shape

{
  method: string;
  url: string;
  statusCode: number | null;
  duration: number | null;        // ms
  requestBody: unknown | null;
  responseBody: unknown | null;
  requestHeaders: Record<string, string>;
  timestamp: string;              // ISO 8601
}

Caveats

  • Patches window.fetch and XMLHttpRequest globally — anything that depends on the original references (rare) will see the wrapped versions.
  • Request/response bodies are off by default. Turn on per-route only via a sanitizer that strips PII fields.
  • The SDK's own ingest endpoint is not auto-excluded — add it to ignoreUrls if you don't want to record self-traffic (e.g. exclude /sdk/events).
  • Sanitizers receive the entry after body capture decision; returning null drops the entry entirely (not just bodies).
  • getEntries() returns a snapshot copy. Mutating it does not affect the live buffer.

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]