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

@pulsebeam/peer

v0.1.0-rc.2

Published

Simplifies real-time application development. Defines signaling protocol for connection establishment, handling media and data transmission, and provides infrastructure.

Downloads

159

Readme

@pulsebeam/peer: WebRTC Peer-to-Peer Communication SDK

Simplifies real-time application development. Defines signaling protocol for connection establishment, handling media and data transmission, and provides infrastructure.

Features

  • Media & Data Support: Transmit audio, video, and/or data channels within your applications.
  • Abstracted Signaling: Handles the exchange of information required to set up WebRTC connections, relieving you of low-level details.
  • Automatic Reconnection: Maintains connection stability by automatically re-establishing connections when disruptions occur.
  • Opt out of Peer-to-Peer: Can configure to force server-relayed communication.

Roadmap

The project is in active development, please refer to the roadmap to track our major milestones.

Status

[!WARNING] This SDK is currently in Developer Preview. During this phase:

  • APIs are subject to breaking changes
  • Stability issues may occur
  • Core functionality is still being validated

We value your input!
Report bugs, suggest improvements, or collaborate directly with our team:

Create GitHub Issues
Join PulseBeam Developer Discord

Installation

Install and import the package using npm, deno, or yarn:

Use with npm

Add Package

npm i @pulsebeam/peer

Import symbol

import * as peer from "@pulsebeam/peer";

Use with Yarn

Add Package

yarn add @pulsebeam/peer

Import symbol

import * as peer from "@pulsebeam/peer";

Usage

Here's an example demonstrating how to use @pulsebeam/peer to establish a peer-to-peer connection:

import { Peer, createPeer } from "@pulsebeam/peer";

// Obtain an authentication token (implementation specific)
const authResponse = await fetch("/auth");
const { groupId, token } = await authResponse.json();

// Create a Peer instance
const peer = await createPeer({ token });

peer.onsession = (session) => {
  session.ontrack = ({ streams }) => console.log("New media stream:", streams);
  session.ondatachannel = (event) => console.log("Data channel:", event.channel);
  session.onconnectionstatechange = () => console.log("Connection state changed");
};

// Start Alice's availability. Connect to our signaling servers
peer.start();

// Connect to bob
const abortController = new AbortController();
await peer.connect(groupId, "bob", abortController.signal);

This example retrieves an authentication token (implementation details will vary depending on your setup), creates a Peer instance, and defines event handlers for receiving media streams, data channels, and connection state changes (optional). Finally, it starts connection attempts and connects to a specific peer identified by its ID within the group.

Documentation

For documentation, API keys, and usage scenarios, please refer to the official PulseBeam documentation:

  • Guide: https://pulsebeam.dev/docs
  • Client SDK Reference: https://jsr.io/@pulsebeam/peer
  • Server SDK Reference: https://jsr.io/@pulsebeam/server

Semantic Versioning

This project adheres to Semantic Versioning 2.0.0.

  • MAJOR version (X.y.z): Incompatible API changes.
  • MINOR version (x.Y.z): Functionality added in a backwards compatible manner.
  • PATCH version (x.y.Z): Backwards compatible bug fixes.

WebRTC Resources

For a deeper understanding of WebRTC concepts, consult the official WebRTC documentation:

  • https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API

Related Links

|Name|Link| |-|-| |Client SDK|https://github.com/PulseBeamDev/pulsebeam-js| |Server SDK|https://github.com/PulseBeamDev/pulsebeam-core| |FOSS Server|https://github.com/PulseBeamDev/pulsebeam-server-foss| |Signaling Protocol|https://github.com/PulseBeamDev/pulsebeam-proto| |Documentation|https://github.com/PulseBeamDev/docs| |PulseBeam Cloud|https://cloud.pulsebeam.dev|