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

dx-calc

v0.2.3

Published

A math engine built in vanilla JS — zero dependencies, pure brainpower.

Readme

GitHub repo size GitHub License GitHub Issues

DXCalc

A custom-built JavaScript math engine focused on precision, clarity, and full control. No dependencies. No borrowed logic. Just pure vanilla JS, crafted from scratch.

Features

  • Arbitrary-precision number handling (BigInt-friendly)
  • Core arithmetic: addition, subtraction, multiplication, division
  • Square root (in progress)
  • Planned: logarithms, exponentiation, trigonometry, parsing, memory stack
  • Eventually: graphical extension (plotting via canvas)

Philosophy

DXCalc is not meant to be a competitor to Decimal.js or Math.js. It’s an exercise in reinventing the wheel — fully self-developed, no lookups, no libraries. Every feature is designed, debugged, and refined from scratch as a personal learning journey.

The name

DXCalc is Decimal Class for standard base 10 numbers (from 0 to 9), that's why the roman 10 "X" in the name.

Why?

I started this project as part of The Odin Project, but it grew beyond a simple calculator. This is a math engine and it's teaching me how math, precision, and JavaScript really work under the hood. Every feature is born from the challenge of solving it unaided — this project is less about speed and more about understanding the why behind every result.

Method Input Expectations:

DXCalc.number(input):

  • Accepts string or number.

DXCalc.multiply(input):

  • string (recommended): Expected format for precise calculations.

  • number (not recommended): May lead to precision issues.

  • bigint: Supported, but the .value getter will return a string in decimal form when needed (e.g., for non-integer results).

DXCalc.number(x).sqrt():

  • Does not expect any input parameters.

Example Usage

To create a new instance of the DXCalc class, use the static DXCalc.number() method.

The DXCalc.number() method accepts a number, a bigint or a string representing a number.

  • Please refrain from inputting number type: DXCalc.number(3.14) → leads to warning (and subtle bugs) or may use octal or whatever representation.
import DXCalc from './path/to/dxCalc.js';

// Create a DXCalc number from a string
const num1 = DXCalc.number('-1.23');

// Example: Division
const num2 = '3.501';
const result = num1.divide(num2).value; // returns '-0.351328191945158'

// Don't do this: Multiplication with a warning about number-type input
DXCalc.number('2.25').multiply(0.000001).value; // Warning: Prefer string input for precision, returns '0.00000225'

// Example: Addition with high precision
const preciseSum = DXCalc.number('0.000000000000000000000000000000001')
  .add(DXCalc.number('0.000000000000000000000000000000002'))
  .value; // Returns '0.000000000000000000000000000000003'

Roadmap

For more detailed progress and future plans, see the DXCalc Project Board or explore the issues

Math Engine Core

  • [x] DXCalc Class

  • [x] Addition, Subtraction, etc.

  • [x] Square Root

  • [ ] Logarithms

  • [ ] Exponentiation

Extended Features

  • [ ] Expression Parser

  • [ ] Constants (π, e)

  • [ ] Memory/Registers

  • [ ] Graphical Plotting (Canvas)

Smart Input

  • [ ] Word-based Input Parsing

Built solo with ❤️ by its-namami.