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

filepizza-client

v2.0.1

Published

Client API for FilePizza, a free peer-to-peer file transfer service.

Downloads

448

Readme

FilePizza Client API

The filepizza-client API provides bindings to FilePizza server. FilePizza is a React library for browser-to-browser file transfer using WebRTC. It allows you to integrate peer-to-peer file sharing functionality into your web applications.

Features

  • Direct browser-to-browser file transfers (no server storage)
  • Password protection for transfers
  • Support for single and multiple file transfers
  • Progress tracking and event notifications

Installation

npm install filepizza-client

Usage

Set up a FilePizza client instance and use it to upload files:

import { FilePizzaUploader } from 'filepizza-client';

const uploader = new FilePizzaUploader({
  filePizzaServerUrl: 'https://your-filepizza-server.com',
  // You can optionally specify an additional shared slug where multiple uploaders can connect and share files
  sharedSlug: 'filepizza-demo'
});

await uploader.initialize();

uploader.on('progress', (progressInfo) => {
  console.log(`Upload progress: ${progressInfo.overallProgress * 100}%`);
});

uploader.setFiles(fileList); // From an input element
const links = uploader.getShareableLinks();
console.log(`Shareable links: ${links.join(', ')}`);

Set up a FilePizza client instance and use it to download files:

import { FilePizzaDownloader } from 'filepizza-client';

const downloader = new FilePizzaDownloader({
  filePizzaServerUrl: 'https://your-filepizza-server.com'
});

await downloader.initialize();

downloader.on('progress', (progressInfo) => {
  console.log(`Download progress: ${progressInfo.overallProgress * 100}%`);
});

await downloader.connect(filePizzaUrl);
await downloader.startDownload();

Examples

Regular Example

Make sure to have the FilePizza server running locally or specify the server URL in the example code.

By default, the example uses https://filepizza.texlyre.org as the demo server URL. This server allows origins from http://localhost:8081 so you can immediately test the API without requiring to run the server locally.

WARNING: The demo server (signaling and TURN as fallback) is not intended for production use and may be subject to rate limits or downtime. For production use, consider setting up your own FilePizza server.

To run the vite-bundled example locally, clone the repository and run:

npm install
npm run build:example
npm run example

Then open http://localhost:8081 in your browser.