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

@signal-js/browser

v1.0.6

Published

Signal SDK - Session replay, network monitoring, and analytics for all platforms

Readme

@signal-js/browser

Signal SDK for browsers — session replay, network monitoring, and analytics.

Installation

npm install @signal-js/browser
# or
pnpm add @signal-js/browser
# or
yarn add @signal-js/browser

CDN

<!-- Full bundle (includes rrweb) -->
<script src="https://unpkg.com/@signal-js/browser/dist/signal-full.global.js"></script>
<script>
  const signal = SignalSDK.createSignal({ endpoint: '...', apiKey: '...', projectId: '...' });
  signal.start();
</script>

Quick Start

import { createSignal } from '@signal-js/browser';

const signal = createSignal({
  endpoint: 'https://your-api.com/events',
  apiKey: 'your-api-key',
  projectId: 'your-project-id',
  enableSessionReplay: true,
  enableNetworkCapture: true,
  enableConsoleCapture: true,
});

await signal.start();
signal.capture('button_clicked', { buttonId: 'submit' });

window.addEventListener('beforeunload', () => signal.flush());

Features

Session Replay

Records user interactions using rrweb.

createSignal({
  enableSessionReplay: true,
  sessionRecordingMasking: { maskAllInputs: true },
});

Network Capture

createSignal({
  enableNetworkCapture: true,
  networkCaptureOptions: {
    recordHeaders: true,
    recordBody: ['application/json'],
    sensitiveHeaders: ['authorization', 'cookie'],
    urlDenyList: [/analytics\.google\.com/],
    payloadSizeLimitBytes: 100000,
  },
});

Console Capture

createSignal({
  enableConsoleCapture: true,
  consoleCaptureOptions: {
    levels: ['warn', 'error'],
    captureErrors: true,
    captureUnhandledRejections: true,
  },
});

Configuration

| Option | Type | Default | Description | |--------|------|---------|-------------| | endpoint | string | - | HTTP endpoint for events | | apiKey | string | - | API key for authentication | | projectId | string | - | Project identifier | | compression | boolean | true | Enable gzip compression | | flushInterval | number | 2000 | Flush interval (ms) | | maxBatchSize | number | 50 | Max events per batch | | sessionIdleTimeoutSeconds | number | 1800 | Session idle timeout | | maxSessionLengthSeconds | number | 86400 | Max session length | | enableSessionReplay | boolean | true | Enable rrweb recording | | enableNetworkCapture | boolean | true | Enable network capture | | enableConsoleCapture | boolean | true | Enable console capture | | debug | boolean | false | Enable debug logging |

API

SignalJS

  • start(): Promise<void> — Start recording
  • stop(): void — Stop recording
  • flush(): Promise<void> — Flush pending events
  • capture(eventName: string, properties?: object): void — Capture custom event
  • identify(distinctId: string, traits?: object): void — Identify user
  • group(groupType: string, groupKey: string, properties?: object): void — Associate with group
  • pauseRecording(): void / resumeRecording(): void — Pause/resume replay
  • dispose(): Promise<void> — Shutdown SDK

Subpath exports

  • Main: @signal-js/browser → SDK with rrweb bundled (CJS, ESM, IIFE as SignalSDK). Use this for NPM/bundlers.
  • Full: @signal-js/browser/full → Same as main (SDK + rrweb). Use for CDN when you want the same bundle as main.
  • Recorder only: @signal-js/browser/recorder → rrweb recorder only (~300KB). Use if you load the SDK separately and want to load rrweb from another script (e.g. /static/recorder.js).

Bundle sizes (approx.)

| File | Description | |------|-------------| | dist/signal.js | SDK + rrweb bundled (~345KB ESM, ~347KB CJS). Default entry; use for NPM. | | dist/signal-full.js | Same as signal.js (SDK + rrweb). Alternative entrypoint; use for CDN. | | dist/recorder.js | rrweb only (~300KB). For loading recorder separately. |

Why both signal.js and signal-full.js? Both include the SDK and rrweb. The main entry (signal) is for NPM/bundlers; signal-full is an alternative entrypoint (e.g. for CDN or when you want to import @signal-js/browser/full). You can use either; they are equivalent. The recorder bundle is for advanced use when you load rrweb from a separate script.

Browser support

Chrome 80+, Firefox 78+, Safari 14+, Edge 80+.

License

MIT