Need help with stdlib?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

2.5K Stars 137 Forks Apache License 2.0 39.1K Commits 170 Opened issues


✨ Standard library for JavaScript and Node.js. ✨

Services available


Need anything else?

Contributors list

stdlib ([/ˈstændərd lɪb/][ipa-english] "standard lib") is a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing applications. The library provides a collection of robust, high performance libraries for mathematics, statistics, data processing, streams, and more and includes many of the utilities you would expect from a standard library.

This is the GitHub repository of stdlib source code and documentation. For help developing stdlib, see the [development guide][stdlib-development].


  • [Homepage][stdlib-homepage]
  • [Documentation][stdlib-documentation]
  • [Source code][stdlib-source]
  • [Code coverage][stdlib-code-coverage]
  • [FAQ][stdlib-faq]

External Resources

  • [Twitter][stdlib-twitter]
  • [Gitter][stdlib-gitter]


  • 150+ [special math functions][@stdlib/math/base/special].

    Demo showcasing special math functions
  • 35+ [probability distributions][@stdlib/stats/base/dists], with support for evaluating probability density functions (PDFs), cumulative distribution functions (CDFs), quantiles, moments, and more.

    Demo showcasing probability distributions
  • 40+ [seedable pseudorandom number generators][@stdlib/random/base] (PRNGs).

    Demo showcasing PRNGs
  • 200+ general [utilities][@stdlib/utils] for data transformation, functional programming, and asynchronous control flow.

    Demo showcasing general utilities
  • 200+ [assertion utilities][@stdlib/assert] for data validation and feature detection.

    Demo showcasing assertion utilities
  • 50+ [sample datasets][@stdlib/datasets] for testing and development.

    Demo showcasing sample datasets
  • A [plot API][@stdlib/plot/ctor] for data visualization and exploratory data analysis.

    Demo showcasing plot API
  • Native add-ons for interfacing with BLAS libraries, with pure JavaScript fallbacks.

    Demo showcasing BLAS APIs
  • A [benchmark framework][@stdlib/bench/harness] supporting TAP.

    Demo showcasing benchmark framework
  • REPL environment with integrated help and examples.

    Demo showcasing REPL environment
  • Can be bundled using [Browserify][browserify], [Webpack][webpack], and other bundlers for use in web browsers.

    Demo showcasing browser support


Running stdlib requires the following prerequisites:

  • [Node.js][node-js]: JavaScript runtime (version >= 0.10)
  • [npm][npm]: package manager (version > 2.7.0; if Node < 1.0.0, version > 2.7.0 and < 4.0.0; if Node < 6.0.0, version > 2.7.0 and < 6.0.0)

Most functionality in stdlib is implemented exclusively in JavaScript; however, some implementations try to capture performance benefits by using [native bindings][node-js-add-ons] and/or [WebAssembly][webassembly]. While not required to run stdlib, as every stdlib implementation has a JavaScript fallback, the following dependencies are required for building native add-ons, including linking to BLAS and LAPACK libraries:

  • [GNU make][make]: development utility and task runner
  • [GNU bash][bash]: an sh-compatible shell
  • [gcc & g++][gcc] or [Clang][clang]: C/C++ compilation and linking (g++ version >= 4.8; clang version >= 3.5, Xcode version >=8.3.1 on OS X)
  • [gfortran][gfortran]: Fortran compilation and linking (version >= 4.8)

While not required to run stdlib, the following dependencies are required for automatically downloading external libraries:

  • [curl][curl], [wget][wget], or [fetch][fetch] (FreeBSD): utilities for downloading remote resources

The following external libraries can be automatically downloaded and compiled from source using make:

  • [OpenBLAS][openblas]: optimized BLAS library
  • [Electron][electron]: framework for cross-platform desktop applications


To install as a library or application dependency,

$ npm install @stdlib/stdlib

Once installed, stdlib packages can be individually required/imported to minimize load times and decrease bundle sizes. For example,

var dswap = require( '@stdlib/blas/base/dswap' );

To install globally for use as a command-line utility,

$ npm install -g @stdlib/stdlib

which will expose the stdlib command. For example, to see available sub-commands

$ stdlib help

and to run the [REPL][@stdlib/repl]

$ stdlib repl

For distributable bundles for use in browser environments or as shared ("vendored") libraries in server environments, see the [dist][stdlib-bundles] directory and associated [guide][stdlib-bundles].

Otherwise, to install as a system library, follow the [download][stdlib-development], [configuration][stdlib-development], and [installation][stdlib-development] instructions as described in the [development guide][stdlib-development].


See the [contributing guidelines][stdlib-contributing].


See [LICENSE][stdlib-license].


Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].




[![git tag][tag-image]][tag-url] [![NPM version][npm-image]][npm-url] [![Node.js version][node-image]][node-url]


OS Build (master) Coverage (master) Build (develop) Coverage (develop)
Linux/OS X [![Linux/OS X build status (master)][build-image-master]][build-url-master] [![coverage (master)][coverage-image-master]][coverage-url-master] [![Linux/OS X build status (develop)][build-image-develop]][build-url-develop] [![coverage (develop)][coverage-image-develop]][coverage-url-develop]
Windows [![Windows build status (master)][windows-build-image-master]][windows-build-url-master] [![coverage (master)][coverage-image-master]][coverage-url-master] [![Windows build status (develop)][windows-build-image-develop]][windows-build-url-develop] [![coverage (develop)][coverage-image-develop]][coverage-url-develop]


[![Dependencies][dependencies-image]][dependencies-url] [![DevDependencies][dev-dependencies-image]][dev-dependencies-url]




Build Infrastructure

Test and build infrastructure is generously provided by the following services:

Continuous Integration Service Logos

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.