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

@cmuav/web-serial-polyfill

v1.2.0

Published

WebSerial API polyfill over WebUSB, supporting CDC-ACM, Prolific PL2303 (including G-series HXN), and FTDI USB-to-serial adapters. Fork of google/web-serial-polyfill.

Readme

Web Serial Polyfill

A Web Serial API implementation over WebUSB for USB-to-serial adapters. Useful on platforms like Android that support WebUSB but not Web Serial.

Fork of google/web-serial-polyfill with added support for PL2303 and FTDI chips.

Supported hardware

| Chip family | Class | Examples | |---|---|---| | CDC-ACM | Standard USB serial | Arduino, STM32, RP2040, CP210x (some) | | Prolific PL2303 | Vendor (incl. HXN/G-series) | PL2303, PL2303HX, PL2303GC/GB/GT/GL/GE/GS | | FTDI | Vendor | FT232R, FT232H, FT2232H, FT4232H, FT230X/FT231X, FT233HP/FT232HP |

Chip type is auto-detected from the USB vendor/product ID. No configuration required.

Install

npm install @cmuav/web-serial-polyfill

Usage

import { serial } from '@cmuav/web-serial-polyfill';

// Prompt user to pick a USB device
const port = await serial.requestPort();
await port.open({ baudRate: 115200 });

// Read
const reader = port.readable!.getReader();
const { value } = await reader.read();
reader.releaseLock();

// Write
const writer = port.writable!.getWriter();
await writer.write(new Uint8Array([0x01, 0x02]));
writer.releaseLock();

await port.close();

FTDI details

The FTDI driver handles:

  • Chip detection via bcdDevice — SIO, FT232A/B/R, FT2232C/H, FT4232H, FT232H, FTX, and HP-series
  • Baud rate divisor encoding — 232BM algorithm (48 MHz) for standard chips, 2232H algorithm (120 MHz) for hi-speed chips
  • Status byte stripping — FTDI prepends 2 bytes (modem + line status) per USB packet; these are automatically removed from the readable stream
  • Multi-channel — correct wIndex channel encoding for FT2232/FT4232 multi-port devices

Development

npm install
npm run build

License

Apache-2.0