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

speeder

v1.1.1

Published

Quickly assesses function speed for node.js functions.

Downloads

9

Readme

speeder

Quickly assesses function speed for node.js functions.

Simple example:

  const speeder = require('speeder')

  function testFunction() {
    // ...
  }

  const result = await speeder(testFunction, {verbose: true})
  console.log(result)
  /**
   *  => {
   *   min: 0.0004448890686035156,
   *   max: 0.024062156677246094,
   *   mean: 0.0006889100074768067,
   *   median: 0.0004668235778808594,
   *   variance: 0.0000014637582903558247,
   *   std: 0.0012098587894278509, // standard deviation
   *   counts: 1000,
   *   name: 'Function 1'
   *   }
   */

Ofcourse, some functions will want to be run with one input:

const result = await speeder(testFunction, {inputs: 777})

Some other might want to be run with multiple inputs:

const result = await speeder(testFunction, {inputs: [777, true], multipleInputs: true})

You can also analyze an array of functions:

const result = await speeder([testFunction, testFunction2], {inputs: [777, true]})

as well as have inputs for all of these functions as well:

const result = await speeder([testFunction, testFunction2], {inputs: [["firstInput", ["secondInput"]], [true, false]]})

You can also create your own analytics pipeline by only fetching the raw data:

const result = await speeder([testFunction, testFunction2], {raw: true})
console.log(result) // => [0.023, 0.022, 0.045, ....]

Full list of options:

{names: "fetchData function"}: Return the analysis with the specified string name

{inputs: [88, true, ...] (default no inputs): Executes the function with the given inputs (use double arrays for multiple functions)

{multipleInputs: true} (default: false): Whether you are inputting mutiple values into the functions or not (NOTE: for multiple functions, you can input an array: {multipleInputs: [true, true, false, true,...]})

{errors: true} (default false): If set to true, and an error is thrown, it includes this particular datapoint in the analysis.

{errorOutAfter: 10} (default 1): Specifies the number of errors that may occur before execution is halted (used in conjunction with the errors option). If an error is thrown, and {errors: false}, it will not include this data point in the analysis

{raw: true} (default false): If true, returns an array of datapoints

{counts: 75} (default 1000): Specifies the number of times the functions are run

{verbose: true} (default false): Gives you a detailed analysis of function performance

{round: 4} (default none): Round the results to a given amount of significant figures

Note, that any of the inputs can also be arrays of the specified inputts, if you input multiple functions to analyze.

Support

Feel free to open issues and request features on github.