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

@digitaldefiance/eecp-browser

v0.1.1

Published

Browser-compatible EECP client and server implementations

Readme

@digitaldefiance/eecp-browser

Browser-compatible EECP (Ephemeral Encrypted Collaboration Protocol) client and server implementations.

Overview

This package provides browser-compatible versions of the EECP client and server that run entirely in the browser without Node.js dependencies. Perfect for demos, testing, and client-side applications.

Features

  • BrowserEECPClient: Full-featured EECP client that runs in the browser
  • BrowserEECPServer: In-memory EECP server for browser-based demos
  • BrowserTransport: EventEmitter-based transport layer (replaces WebSocket)
  • MessageBus: Message routing and visualization support

Installation

npm install @digitaldefiance/eecp-browser
# or
yarn add @digitaldefiance/eecp-browser

Usage

Basic Client-Server Setup

import { BrowserEECPServer, BrowserEECPClient } from '@digitaldefiance/eecp-browser';
import { GuidV4 } from '@digitaldefiance/ecies-lib';

// Create server
const server = new BrowserEECPServer();
server.start();

// Create workspace
const workspaceConfig = {
  id: GuidV4.new(),
  createdAt: Date.now(),
  expiresAt: Date.now() + 30 * 60 * 1000,
  timeWindow: {
    startTime: Date.now(),
    endTime: Date.now() + 30 * 60 * 1000,
    rotationInterval: 15,
    gracePeriod: 60 * 1000,
  },
  maxParticipants: 50,
  allowExtension: false,
};

const publicKey = new Uint8Array(32);
const workspace = await server.createWorkspace(workspaceConfig, publicKey);

// Create client
const client = new BrowserEECPClient();
await client.initialize();

// Connect client to server
const transport = server.createTransport();
transport.connect();

const workspaceSecret = Buffer.alloc(32);
crypto.getRandomValues(workspaceSecret);

await client.connect(transport, workspace.id, workspaceSecret, workspaceConfig);

// Use the client
await client.insert(0, 'Hello, World!');
console.log(client.getText()); // "Hello, World!"

Multi-Client Collaboration

// Create second client
const client2 = new BrowserEECPClient();
await client2.initialize();

const transport2 = server.createTransport();
transport2.connect();

await client2.connect(transport2, workspace.id, workspaceSecret, workspaceConfig);

// Listen for changes
client2.onChange((text) => {
  console.log('Client 2 received:', text);
});

// Client 1 makes a change
await client.insert(0, 'Synced text');

// Client 2 will receive the update

Key Differences from Node.js Server

  • Storage: In-memory Maps instead of database
  • Crypto: Web Crypto API instead of Node.js crypto
  • Transport: EventEmitter instead of WebSocket
  • Timers: window.setTimeout/setInterval instead of Node.js timers

API

BrowserEECPClient

  • initialize(): Initialize the client
  • connect(transport, workspaceId, workspaceSecret, workspaceConfig?): Connect to workspace
  • insert(position, text): Insert text at position
  • delete(position, length): Delete text
  • getText(): Get current text
  • onChange(callback): Subscribe to text changes
  • disconnect(): Disconnect from workspace

BrowserEECPServer

  • start(): Start the server
  • stop(): Stop the server
  • createWorkspace(config, publicKey): Create a new workspace
  • getWorkspace(workspaceId): Get workspace by ID
  • createTransport(): Create a new transport connection
  • getHealth(): Get server health status

License

MIT