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

npm-probe

v0.1.9

Published

Probe npm registries for statistics

Readme

npm-probe Build Status NPM version Coverage Status

Probe npm registries for statistics

Usage

Instantiate a new npm-probe instance which will collect statistics from npm registries and mirrors. If you'd like to run the instance without actively gathering data, provide the flag silent: true.

var Collector = require('npm-probe');
  , collector = new Collector({
      npm: nodejitsu.config.get('npm'),
      probes: [ Collector.probes.ping ],
      silent: false
    });

Active execution of the probes can be prevented by setting the following environment variable: PROBE=silent. This allows you to use the collector as static instance to access cache or other methods.

Registries

Providing an alternative or reduced list of registries is possible by setting options.registries. The list should be an object with unique registry names, see registries.json for an example.

Probes

npm-probe: ping

The ping probe will perform 5 parallel request to the database page of each registry's CouchDB. The response time of these 5 request are averaged and statistics (min, max, stdev) will be calculated.

npm-probe: delta

This probe works on the back of the SkimDB feed follower. Modules stored in the feed collection will be checked against each listed registry/mirror. The lag is determined from the latest known update time for each module. The difference is calculated in milliseconds. Only modules that are lagging, e.g. have a difference > 0 will be included in the statistics.

npm-probe: publish

This probe is designed to publish to the npmjs.org registry and can be used to check publishing consistency and actual duration. The semantic version is updated as follows:

  • patch: incremented each publish, resets to 0 when the minor is updated
  • minor: current day of the year
  • major: current year

Development

To contribute, simply clone the repository and submit pull requests. Please provide unit tests with each change.

git clone [email protected]:Moveo/npm-probe.git

If you like to design a custom probe, note that the following methods should be available on the API of the probe. The parameters will be provided from the main Collector instance. In addition to that fusing is available to create read-only properties on the probe.

To aquire a predefined Probe constructor the factory method Collector.create can be used. After add all API methods to the provided constructor. Make sure that the time schedule specifications are compatible with node-schedule.

require('npm-probe').create(
  'mycustomprobe',                           // name of the probe
  { minute: new schedule.Range(0, 60, 1) }   // time schedule
);

Probe.prototype.execute

Actual logic that gets executed whenever the timing schedule triggers a run.

  • @param {Object} endpoint URL parsed endpoint.
  • @param {Function} done Completion callback.
  • @api public

Probe.transform

Return transformed data, this can be done via grouping or calculating moving averages or any other map reduce methodology.

  • @param {Object} memo Data.
  • @param {Object} probe Measurements of single probe.
  • @param {Number} i Current iteration.
  • @param {Array} stack Complete serie of measurements.
  • @returns {object} altered memo

Probe.latest

Return the value that should be used as latest value.

  • @param {Array} transformed Data transformed with transform
  • @param {Array} plain Orginal data.
  • @returns {Mixed} string or numeric value

Probe.group

Group functionality by time, group per millisecond, hour or day.

  • @param {Number} time Unix timestamp.
  • @returns {Number} Unique identifier for the group.

Probe.group

  • @type {Object} Default representation of grouped results.