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

@platformparity/streams

v1.0.0-wip.5

Published

Reference implementation and tests for the WHATWG Streams Standard

Downloads

13

Readme

Reference Implementation and Tests

This folder contains a reference implementation of the streams standard, inside lib/. It also contains infrastructure to run the web platform tests against the reference implementation, described below.

Reference implementation

The reference implementation is meant to be a fairly close transcription of the spec into JavaScript. It is written in modern JavaScript and primarily tested in Node.js; at least version 6.0.0 is required.

Tests

Test coverage is not complete, but we do aim for it to be. Adding tests would be a great way to contribute to this project.

You can check the test coverage at any time by running npm run coverage in this folder.

To run all tests (and the lint step), run npm test in this folder.

Web platform tests

The test suite for this standard is written in web platform tests format.

  • To run the web platform tests, type npm run wpt in this folder.
  • To run specific test files, you can use a glob pattern, rooted at the streams directory: npm run wpt -- "writable-streams/**"

The test runner here is a Node.js emulated-DOM environment, with the reference implementation loaded into it.

To sync your local web-platform-tests checkout with the one tracked by this repository, type npm run sync-wpt. However, note that this will override any local modifications you've made, e.g. in the process of working on a spec change. It's thus good to do this before you start working on such a change.

Upstream web platform tests

The web platform tests for streams are found in the streams directory of the web platform tests repository, and maintained via pull requests to that repository. They are then pulled into this repository via a Git submodule.

This means that in order to land a test change for these tests, you'll need to make a pull request to the web platform tests repository, and then update the submodule pointer in this repository (probably in the same pull request as your spec change). That can be done via the command

git submodule update --remote web-platform-tests

and then staging and commiting the submodule update.

If you are working on a spec change and need to modify or add to these tests, what you can do is work directly in the web-platform-tests subdirectory. Create a branch there, where you modify the tests. You can then modify the spec and reference implementation to match your branch. Finally, you can use that branch to send a pull request to the web-platform-tests project.

Diagnostics

Diagnostic output is provided using the debug package. It is useful to understand the behaviour of the reference implementation, particularly in tests that exercise asynchronous behaviour. To enable, set the DEBUG environment variable. For example, in Bash,

DEBUG=streams:* npm test

See lib/transform-stream.js for examples of how debug statements are used. Diagnostic coverage is sparse at the moment; we expect to add more diagnostics in an ad-hoc manner as they are needed.