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 🙏

© 2025 – Pkg Stats / Ryan Hefner

warp-pipes

v0.2.1

Published

Nodejs stream utility

Readme

warp-pipes [beta]

Build Status Test Coverage Maintainability Greenkeeper badge

logo

Stream util library for nodejs.

Description

Provide transformers and some utility class to extends node stream funcionality.

  • Transformers: Chunk, DropWhile, Filter, Flatten, Map, TakeWhile
  • Utility: fork, pipe, split and all transforms

Installation

yarn add warp-pipes

Quickstart

import { Chunk, Map, ReadableWrap } from 'warp-pipes';
import { WritableMock } from 'stream-mock';

const opts = { objectMode: true };

const setAdult = chunk => Object.assign({}, chunk, { adult: true });
const unsetAdult = chunk => Object.assign({}, chunk, { adult: false });

// readable is a Readable stream
const sink = ReadableWrap.wrap(readable) // create a wrap around readable
  .dropWhile(chunk => chunk.name === undefined, opts) // Drop while name is not defined
  .filter(chunk => chunk.name.startsWith('A'), opts) // Filter names starting with `A`
  .split(
    [
      {
        stream: new Map(setAdult, opts), // pipe to Map stream applying setAdult function to each chunk
        condition: chunk => chunk.age >= 18 // condition to send to setAdult mapper
      },
      {
        stream: new Map(unsetAdult, opts), // pipe to Map stream applying unsetAdult function to each chunk
        condition: chunk => chunk.age < 18 // // condition to send to unsetAdult mapper
      }
    ],
    opts
  )
  .pipe([
    // pipe each stream into another stream
    new Chunk(10, opts), // Chunk data by 10
    new Chunk(5, opts) // Chunk data by 5
  ])
  .merge() // Merge both stream in a simple one
  .pipe(new WritableMock(opts)); // Pipe resulting data in to a WritableMock

sink.on('finish', () => console.log(sink.data));

Caveheats

warp-pipes is currently on beta stage. Here are some caveheats :

  • Test coverage is not high enough for streams in buffer mode
  • API is not definitive (that's why the API doc is in WIP state)
  • No benchamarks.

Road map

  • Improve test coverage
  • Add more transformers
  • Add performance tests
  • Add docs

Contributing

Feel free to open any bug, feature, or pull request. When making a pr, just remember to cover your code with unit tests. And please follow the code style through tslint (but we can discuss about tslint rules).