mrkeyoor.com_
Tue 01 Sept 16:21 UTC
Dataevaluationupdated 24 Aug 2026

stdlib review

stdlib is a large standard library for numerical and scientific computing in JavaScript, TypeScript, and some C. It supplies focused packages for math, statistics, arrays, random numbers, data processing, streams, plotting, and related utilities so developers do not have to assemble those basics from unrelated modules.

+4stars / 7d
Verdict

stdlib is the best fit for JavaScript teams that care about numerical breadth, typed APIs, and the option to install one exact function at a time. Do not begin with the full repository package unless you need the REPL or a wide part of the library: our install was huge, its audit was noisy, and its test run hit an expired certificate. Start with individual @stdlib packages, pin versions, and run an audit that reflects the subset you will ship.

We ran it

Lab card: what happened when we ran stdlibScreenshot of stdlib (stdlib.io)
Install✓ · 509s12036 packages · 5684 MB
Buildn/ano build script
Tests✗ · 63sran, no count parsed
Known vulns569 critical · 31 high · 12 moderate · 4 low (npm audit)
Repo1350 files~32,260 lines of source · 23.8 MB · 79 CI workflows · tests dir

Answers from our run

Does stdlib build from source?

Dependencies installed in 509 seconds (12036 packages), and the project has no separate build step. We cloned commit 6fca15c into a clean Debian container with 3 CPUs and no project-specific setup.

Do stdlib's tests pass?

The test command failed in our container, and its output did not report a pass or fail count.

Does stdlib have known vulnerabilities in its dependencies?

npm audit flagged 56 known advisories in the dependency tree, including 9 critical at the time of our run.

Who should not use stdlib?

Applications that need only a few functions but plan to install the whole library: the README warns that the full project is likely unnecessary and causes slower installs.

What are the alternatives to stdlib?

Math.js, TensorFlow.js, Danfo.js. stdlib is the best fit for JavaScript teams that care about numerical breadth, typed APIs, and the option to install one exact function at a time.

Setup2/5Individual packages are simple; the full checkout is large and make-based
Docs5/5Package docs, declarations, examples, and contributor guidance are extensive
Community5/5Daily repository activity and a large, actively reviewed contribution queue
Maturity4/5A decade of development, with current audit and test concerns to assess

Discussed on

  1. hnStandard library for JavaScript and Node.js19 points
  2. hnShow HN: The closest thing JavaScript might have to a standard library7 points
  3. hnStandard library for JavaScript4 points
  4. hnStdlib-JS4 points
  5. hnStdlib – collection of robust, high performance libraries for numeric computing4 points

Who it’s for

JavaScript and TypeScript teams doing numerical work that want small functions with dedicated documentation and declarations.
Node.js developers who prefer installing individual math, statistics, ndarray, or utility packages.
Browser developers who need selected functions through ESM, UMD, or custom bundles.
Contributors interested in numerical algorithms, native C implementations, WebAssembly, or reference-tested special functions.

Who it’s NOT for

Applications that need only a few functions but plan to install the whole library: the README warns that the full project is likely unnecessary and causes slower installs.
Teams that require a clean dependency audit before adoption: our fresh full-repository run reported 56 known vulnerabilities, including 9 critical and 31 high.
Developers who need the complete test command to pass offline in a fresh Node 22 container: our run stopped on CERT_HAS_EXPIRED during the JavaScript tests.
Contributors seeking a minimal Node-only toolchain: the development guide uses GNU make and Bash, with optional work requiring C, C++, Fortran, Python, R, Julia, CMake, or other tools.
Projects wanting one conventional package path across Node, browsers, and Deno: the README documents separate individual packages, namespace packages, ESM branches, UMD branches, and Deno branches.

Setup reality

Our fresh Node 22 sandbox installed 12,036 packages in 509 seconds and consumed 5,684 MB. The checkout held 1,350 files and about 32,260 lines of source in 23.8 MB. There was no generic build script or target, so we skipped that step. Tests exited 2 after 63 seconds because a TLS certificate had expired. npm audit found 56 known vulnerabilities: 9 critical, 31 high, 12 moderate, and 4 low.

Using one published function is much lighter than developing the full repository. The README recommends individual packages for most Node and browser applications, namespace packages when many related functions are needed, and the complete package mainly for broad analysis or the REPL. No account or API key is required.

Repository development revolves around GNU make and Bash. Native add-ons can require C, C++, and Fortran compilers plus BLAS or LAPACK libraries, though JavaScript fallbacks are available. The development guide also warns that spaces and shell metacharacters in the checkout path can break its make-based setup.

A standard library assembled from small parts

JavaScript has built-in numbers, typed arrays, and Math functions, yet serious numerical work quickly needs more. stdlib fills that gap with packages for special functions, probability distributions, pseudorandom generators, ndarrays, BLAS operations, statistics, streams, datasets, plotting, and general utilities. Many implementations are JavaScript, while selected paths have native C or WebAssembly options and JavaScript fallbacks. TypeScript declaration files accompany the functions.

The design choice that matters most is decomposition. A developer can install the full @stdlib/stdlib package, a top-level namespace such as @stdlib/math, or one function published under a hyphenated package name. The README repeatedly recommends the last option for Node and browser applications that use a small slice of the project. That advice is sound. stdlib is easier to justify as a catalog of precise building blocks than as one default dependency.

Its scope reaches beyond an npm library. There is a command-line interface and REPL, browser bundles, separate ESM and Deno builds, custom bundle tooling, benchmarks, and native bindings that can connect to BLAS libraries. This breadth is useful for teams committed to numerical JavaScript. It also produces several ways to consume the same project, each with its own naming and distribution conventions.

What happened when we ran it

We cloned commit 6fca15c into a fresh unprivileged Node 22 container with 3 CPUs, 8 GB of RAM, and no secrets. The checkout contained 1,350 files, about 32,260 lines of source, and occupied 23.8 MB. Installation succeeded, though it took 509 seconds, installed 12,036 packages, and used 5,684 MB on disk.

There was no generic build script or target for the lab, so that step was skipped. The test command exited with code 2 after 63 seconds. Its final output showed a Node TLS error with code CERT_HAS_EXPIRED, followed by a make failure in the local JavaScript test target. The supplied summary contained separate passing: 327 and passing: 2 lines, then the run stopped. The log does not identify which remote certificate expired, so we cannot assign a cause beyond that error.

The npm audit reported 56 known vulnerabilities: 9 critical, 31 high, 12 moderate, and 4 low. That result describes the full repository installation we tested. It does not establish the audit result for an individual published function, which can have a much smaller dependency graph. Teams should audit the exact packages and versions selected for their application.

Choose the installation boundary first

The full install result makes the README's user stories more than documentation nicety. If an application needs an ndarray constructor and one special function, install those individual packages. Replacing slashes after @stdlib/ with hyphens is slightly unusual, though the examples make it clear. Namespace packages trade fewer manifest entries for installing code the application may never call.

Browser consumption needs another choice. Individual packages have ESM builds on dedicated branches and UMD builds for script tags or vendoring. Deno builds also live on dedicated branches. Bundlers can consume the packages, and custom bundle tooling exists for teams that need a selected collection. This is flexible once understood, but it is less direct than a single package with modern exports for every runtime.

For ordinary library use, most functions need only Node and npm. Native performance work is different. Building add-ons can require GNU make, Bash, C and C++ compilers, gfortran, and external numerical libraries. The development guide names more optional tools for testing and reference work, including Python, R, Julia, CMake, and Emscripten. JavaScript fallbacks keep that toolchain optional for consumers, while contributors working on low-level code will meet it quickly.

Documentation favors precision

stdlib's strongest trait is how much material exists around small functions. The main README maps different user stories to package choices. Package-level documentation, examples, benchmarks, declarations, and REPL help provide the sort of detail numerical APIs need. The development guide covers installation diagnostics, filtered tests, examples, benchmarks, and optional dependencies.

That rigor has a cost. The repository uses GNU make as its main task layer, and its guide warns that spaces or shell metacharacters in the checkout path can break setup. A first contribution involves make install, dependency diagnostics, initialization, Git hooks, and filtered verification commands. This is reasonable for a large numerical project, though far heavier than cloning a typical JavaScript utility.

The issue tracker also exposes unfinished work rather than pretending the catalog is complete. Open tracking issues cover missing C implementations, ndarray variants, machine-learning algorithms, and WebAssembly work. Two recently updated automated issues report JavaScript lint and EditorConfig failures. Those are specific maintenance tasks in a repository with many generated and repeated package surfaces.

Health and the decision

The repository was pushed on August 24, 2026. Release 0.4.1 was published on June 6 with a fix for a full-package installation problem caused by outdated namespace packages. GitHub reported 1,376 open issues and pull requests combined, while an issue-only search returned 418 open issues. The large queue needs context: current pull requests and issue updates were landing throughout August 24, including work on BLAS, statistics, declarations, and documentation.

Use stdlib when JavaScript is the chosen numerical environment and you want functions that can be adopted individually. Math.js is easier for a general math surface, Danfo.js is more direct for data frames, and TensorFlow.js owns the model-and-tensor use case. stdlib wins when exact numerical components, TypeScript declarations, and package-level documentation matter. Its individual packages are the practical entry point; the whole repository is for teams prepared to own its size and tooling.

Alternatives

ProjectWhat it isPick it when
Math.jsA general JavaScript math library with expressions, units, matrices, and symbolic operations.pick this instead when you want one approachable math API and expression parser rather than hundreds of narrow packages.
TensorFlow.jsA JavaScript library for running and training machine-learning models in browsers and Node.js.pick this instead when tensor operations and model execution are the main job.
Danfo.jsA JavaScript data-frame library modeled around tabular analysis workflows.pick this instead when your work centers on Series and DataFrame operations rather than low-level numerical functions.

What people are saying

  1. [github-trending] stdlib-js/stdlib

Sources

  1. stdlib README
  2. stdlib development guide
  3. stdlib release 0.4.1
  4. stdlib open issues

More data reviews

turso · TrackersListCollection · dash · getcontact-cli · awesome-zhuiju-free · iggy · the whole board →