A standard library for JavaScript and TypeScript with an emphasis on numerical and scientific computation.
stdlib is a standard library for JavaScript and TypeScript that provides a comprehensive suite of tools for numerical and scientific computation. It includes hundreds of high-performance functions for mathematics, statistics, data processing, and visualization, enabling developers to perform advanced computations directly in browser and Node.js environments. The project aims to make the web a preferred platform for numerical computing by offering robust, well-tested, and modular APIs.
JavaScript and TypeScript developers working on data science, numerical analysis, scientific computing, or any application requiring advanced mathematical and statistical operations. It is also suitable for educators and researchers looking to leverage web technologies for computational tasks.
Developers choose stdlib for its extensive, modular, and high-quality numerical libraries that are specifically designed for JavaScript/TypeScript ecosystems. Its fully decomposable architecture allows for precise customization, and its rigorous testing and documentation ensure reliability. Unlike piecing together disparate packages, stdlib offers a cohesive, standardized suite of tools with native performance optimizations and TypeScript support.
✨ The fundamental numerical library for JavaScript and TypeScript. ✨
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers over 150 special math functions, 35+ probability distributions, and 200+ utilities, providing comprehensive coverage for scientific computing tasks directly in JavaScript/TypeScript.
Fully decomposable design allows installing individual packages or namespaces, minimizing bundle sizes and enabling precise customization without bloating dependencies.
Every function includes TypeScript declarations for type safety, and native add-ons for BLAS libraries with JavaScript fallbacks ensure high-performance computations where needed.
Emphasizes thorough testing, documentation, and code coverage, with a REPL environment for interactive learning, ensuring reliability for production use.
The README outlines multiple installation methods (e.g., individual packages, namespaces, custom bundles) which can be confusing, and setting up native dependencies for optimal performance requires additional tools like gcc and gfortran.
Installing the complete library (@stdlib/stdlib) is substantial and may include unused functionality, leading to slower installation times and larger node_modules, which isn't ideal for lightweight projects.
While comprehensive, it lacks the deep integration with popular data science tools (e.g., pandas, scikit-learn) found in Python or R ecosystems, making it less suitable for hybrid workflows.
stdlib is an open-source alternative to the following products:
MATLAB is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks for matrix manipulations, algorithm development, and data analysis.
SciPy is an open-source Python library used for scientific and technical computing, providing modules for optimization, linear algebra, integration, interpolation, and other mathematical tasks.
Julia is a high-level, high-performance programming language for technical computing, with syntax that is familiar to users of other technical computing environments.
R is a programming language and free software environment for statistical computing and graphics, widely used among statisticians and data miners.