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

httprip

v0.0.5

Published

Manages queues of requests for data processing and collection.

Readme

httprip - Manages queues of requests for data processing and collection.

Build Status

Usage

npm install httprip
var httprip = require("httprip");

var ripper = httprip()
    .processor(function(error, res, body, resolve) {
        // Perform parsing on body here.

        // Yield each item parse from body.
        ripper.yield("item" + Math.floor(Math.random() * 999));
        ripper.yield("item" + Math.floor(Math.random() * 999));

        // Resolve after we've finished processing.
        resolve();
    })
    .data(function(output) {
        console.log("Retrieved item:", output);
    });


// Queue requests.
ripper.enqueueRip({url: "http://google.com"});
ripper.enqueueRip({url: "http://yahoo.com"});
ripper.enqueueRip({url: "http://bing.com"});

// Wait for finish.
ripper.lastQueued().then(function() {
    console.log("done");
})

Explanation

This project provides a shorthand API for processing multiple web requests that may have a common format with the end goal of extracting data. For example, My oroginal goal for this project was to extract a JSON object with all fonts on 1001fonts.com. The code for doing that is contained in example.js

Processing behavior is done declaratively by the processor and data methods.

Functions supplied to processor are called with the usual request paramaters (error, response and body) as well as an additional resolve. resolve is a Promise resolver method and must be called at the end of processing, as processing may be asynchronous and httprip needs to know when the processing has been comleted. During the course of processing, you must run yield on the ripper object to submit a single element of data you are intending to collect.

Whilst the action you might take in the course of yielding an item could be done in the processor method, the yield and processor methods allow you to submit multiple methods that will all be run for processing and yielding.

To send a request off to the ripper, the enqueueRip method is used. This method accepts a single options parameter, which is the same type of object you would give to the request module, giving you the power to custom craft your requests in any way you want.

Waiting for the last queued request to finish can be done by using the lastQueued method, which gives you the Promise for the last request in the queue.

Methods

Method Name | Description --- | --- enqueueRip | Submits a request to the queue. options - Request Options lastQueued | Gets the promise (which fires on completion) for the last request in the queue. processor | Adds a processor function to the ripper processor chain, calling this function for each queued request. data | Adds a data collector function to the ripper data collector chain. This method will be called for each yield. yield | Yields a single element to all data collector functions. item - Item for forwarding to data collectors setRequester | Sets the internal request instance. Useful for injecting a pre-made request object with defaults. requester - New request instance