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

numwiz

v1.3.0

Published

The ultimate number utility — arithmetic, formatting, currency (Lakh/Crore & Million/Billion), number-to-words in 10+ languages, statistics, financial math & more.

Readme

NumWiz

TypeScript number utilities for arithmetic, formatting, currency, number words, statistics, financial math, matrix algebra, NDArray, linear algebra, FFT, calculus, interpolation, signal processing, polynomials, and arbitrary-precision decimals.

npm version npm downloads TypeScript License: Proprietary Build Status

Install

npm install numwiz

NumWiz supports both CommonJS and ESM consumers, includes TypeScript declarations, and publishes subpath exports for smaller imports.

Quick Start

import numwiz, {
  Arithmetic,
  BigPrecision,
  Calculus,
  FFT,
  LinAlg,
  Matrix,
  NDArray,
  Statistics,
} from "numwiz";

numwiz(50).add(50).multiply(2).abbreviate(); // "200"
Arithmetic.add(1, 2, 3, 4); // 10
Statistics.mean([1, 2, 3, 4, 5]); // 3

Matrix.determinant([
  [1, 2],
  [3, 4],
]); // -2

const a = NDArray.arange(0, 6).reshape([2, 3]);
a.shape; // [2, 3]

LinAlg.solve(
  [
    [2, 1],
    [1, 3],
  ],
  [5, 10]
).toArray(); // Float64Array [1, 3]

FFT.rfft([1, 0, -1, 0]);
Calculus.integrate((x) => x ** 2, 0, 3); // approximately 9

new BigPrecision("0.1").add("0.2").toString(); // "0.3"

Import Styles

import numwiz, { Formatting, Matrix } from "numwiz";
import Arithmetic from "numwiz/arithmetic";
import NDArray from "numwiz/ndarray";
import LinAlg from "numwiz/linalg";
import BigPrecision from "numwiz/precision";
const { numwiz, Arithmetic } = require("numwiz");
const Matrix = require("numwiz/matrix").default;

API Shape

NumWiz keeps two public API styles:

| Style | Example | Best for | | --- | --- | --- | | Chain API | numwiz(100).add(25).toCurrency("USD") | Fluent single-number workflows | | Static modules | Statistics.mean(values) | Direct, testable, tree-shakeable calls |

Main modules:

  • Core numbers: Arithmetic, Comparison, Validation, Conversion, Formatting, Currency, NumberWords
  • Math utilities: Advanced, Financial, Range, Sequences, Random, SeededRandom, Trigonometry
  • Scientific computing: Matrix, NDArray, LinAlg, Polynomial, Calculus, FFT, Interpolation, Signal
  • Precision: BigPrecision, RoundingMode

Detailed API reference lives in docs/API.md.

Practical Examples

import { Currency, Financial, Matrix, NumberWords, Statistics } from "numwiz";

const subtotal = 1250 + 850;
const total = Financial.priceWithTax(subtotal, 15);
Currency.format(total, "BDT", "bn-BD"); // BDT-formatted invoice total

Financial.emi(1_000_000, 9.5, 120); // monthly loan payment

NumberWords.toWords(125000, "bn", "indian"); // Bangladesh-style taka words helper

Statistics.quartiles([10, 12, 13, 15, 18, 21]);

Matrix.solve(
  [
    [3, 2],
    [1, 2],
  ],
  [18, 10]
); // [[4], [3]]

More examples are in docs/EXAMPLES.md.

Quality Gates

npm run typecheck
npm run lint
npm test
npm run coverage
npm run build
npm run package:validate
npm run bench

Benchmarks write a Markdown report and raw JSON to benchmark/. See benchmark/README.md and docs/VALIDATION.md.

Packaging

  • main: CommonJS build at dist/index.js
  • module: ESM compatibility wrapper at dist/index.mjs
  • types: bundled declarations at dist/index.d.ts
  • exports: root and module subpaths with types, import, require, and default
  • sideEffects: false for bundler tree-shaking metadata

License

Proprietary. All rights reserved.

Use, modification, distribution, publication, sublicensing, sale, hosting, or derivative works require prior written permission from Subroto Saha. See LICENSE.