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

statlab

v0.1.0

Published

A large, dependency-free statistics & modeling library for JavaScript/TypeScript.

Readme

statlab

A large, dependency-free statistics & modeling library for JavaScript/TypeScript. 84 method modules + 6 numerical primitives — regression, ANOVA, survival, econometrics, multivariate, Bayesian, nonparametric, time series, and much more. Pure ESM, runtime-agnostic (runs unchanged in Node and the browser), ships ESM + CJS.

Install

npm install statlab

Zero runtime dependencies.

Usage

The public API is namespaced by module (this resolves function-name collisions across modules — e.g. bootstrapCI, hausmanTest, egarch each appear in more than one module).

// Namespaced barrel
import { survival, anova, core } from 'statlab';

survival.coxPH(/* … */);
anova.oneWayANOVA(/* … */);
core.avg([1, 2, 3]);

// Or import a single module directly (tree-shakeable subpath)
import { coxPH } from 'statlab/methods/survival';
import { avg } from 'statlab/math/core';

CommonJS works too:

const { survival } = require('statlab');

Module layout

  • statlab/math/* — numerical primitives: core, distributions, inference, matrix, power, rng.
  • statlab/methods/* — the 84 statistical method modules (anova, regression, survival, ecology, econometric, sem, bayesian, …).

Note: two modules share the basename power. In the barrel, the low-level primitives are power (statlab/math/power) and the power-analysis methods are powerAnalysis (statlab/methods/power).

Accuracy & rigor

Every headline method is covered by tests, many against independent numeric oracles (R / scipy / statsmodels). Some methods in the long tail use documented approximations (normal-approx criticals, one-term asymptotic p-values, etc.) — see the repository's BASELINE.md for the per-method rigor classification.

Types

v0.x ships auto-generated .d.ts declarations; parameter types are currently loose (any). Precise JSDoc-derived types are being added module-by-module.

License

MIT