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

@peerconnectonce/core

v0.0.1

Published

Transport-neutral peer connectivity with pluggable WebRTC clients, server runtimes and signaling.

Readme

PeerConnectOnce

A generic peer-to-peer connection toolkit, independent of application frameworks and services.

JavaScript output targets ES2018 (both ESM and CommonJS). This is a syntax/library target, not a promise that every ES2018-era runtime exposes WebRTC, Fetch or modern Web Crypto. The Node server's supported runtime floor remains Node.js 20; browser clients require native WebRTC or a supplied platform implementation.

Package: @peerconnectonce/core

Four public entry points:

  • @peerconnectonce/core/client - platform-independent ICE/SDP signaling and reconnect lifecycle.
  • @peerconnectonce/core/browser - native browser adapter; imports the shared client core.
  • @peerconnectonce/core/server - Node.js/Werift peer server with registered service handlers.
  • @peerconnectonce/core/signal - injectable rendezvous signaling with in-memory storage or a host-provided store.

Other runtimes such as React Native can supply their own WebRTC driver to /client. All platform-specific runtime construction happens in adapters, never /client.

Authentication, node discovery, ICE/STUN/TURN policy and service authorization are supplied by the embedding application. The core exposes no unrestricted LAN or file proxy. Signaling carries short-lived offers and answers; application data goes via peer channels or a TURN relay when needed. Signal storage is in-memory by default; multi-replica deployments must provide shared storage or consistent routing. The memory store enforces total, per-user pending, and per-user retained-session limits. A terminal answer or failure is protected until its owner explicitly acknowledges receipt via the signaling API or its retention deadline expires. The built-in client acknowledges after the peer data channel opens. Capacity pressure evicts only the oldest acknowledged terminal rows; unread answers and pending offers are never stolen. If nothing is safe to reclaim, new offers are rejected with a capacity error rather than disrupting existing negotiation.

The runtime has bounded data-channel queues and flow control, without an arbitrary bandwidth limit enabled by default. A bandwidth policy is opt-in. Adapter cleanup is bounded by serviceCloseTimeoutMs (5 seconds by default) so one stalled service cannot permanently occupy a peer slot.

Underlying SCTP fragmentation and reassembly are delegated to Werift. maxMessageBytes rejects oversized messages after Werift has reassembled them; it does not bound Werift's memory use during reassembly, even for an eventually complete oversized message. Application-level queues remain bounded. Deployments accepting untrusted connected peers should assess this upstream SCTP resource behavior separately.

Development

Run pnpm check to typecheck, test, build ESM and CommonJS, and check all four self-referencing package entrypoints.

Run pnpm smoke:browser to test a real Chromium-to-Werift roundtrip. This optional smoke test requires Playwright and a matching Chromium browser in the test environment; neither is a package runtime dependency. Install Playwright in an external QA project (for example: pnpm add -D playwright, then pnpm exec playwright install chromium), and make it resolvable from this repository or set PEERCONNECTONCE_PLAYWRIGHT to its absolute module path.

Package publication is intentionally disabled until separately authorized.