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 🙏

© 2025 – Pkg Stats / Ryan Hefner

stringy_numbers

v1.0.1

Published

"Math operations on very large floating point numbers using strings"

Downloads

3

Readme

Stringy Numbers

see stringy_numbers repo on github

Introduction

Stringy Numbers is a lightweight javascript library that allows basic maths operations on very large numbers.

It works by using strings to bypass javascripts limitation on number sizes. Numbers are input into functions as strings, ie. you have to enclose them in quotes as you would a string. The operations support floating point.

Installation

from terminal,

npm i stringy_numbers

to import..

const {mult,div,add,minus,squared,cubed} = require('path/to/node_modules/stringy_numbers')

Functions

As of version 1.0.1 there are four basic maths operations available:

-mult() - multiplication, -div() - division, -add() - addition, -minus() - subtraction

And now sqaured and cubed functions added:

-squared() - find the square of a number -cubed() - find the cube of a number

mult() takes two string numbers as arguments, multiplies them together and returns the result as a string

e.g

mult("1234","5678");
'7006652' 

div() takes a number as its first argument, this sets the precision number of significant digits for the answer, the next two arguments are the dividend and divisor in that order, entered as strings. e.g

div(10,"1234","5678");
' .2173300457907' 

Note: the leading zero is omitted in answers that are less than one. however answers can be input with leading or trailing 0s.

add() takes two string numbers as arguments, adds them together and returns the result as a string e.g

add("1234","5678");
'6912' 

minus() takes two string numbers as arguments, substracts the second `` from the first and returns teh result as a string. e.g

minus("1234","5678");
'-4444' 

There is also a test() function that will run two given numbers through each of the maths operations and compare them with the output of javascripts equivalent native operation, e.g.

test(404,3)

logs the following to the console..

-----------------------------------------------
|              BIG FLOAT TEST                  |
-----------------------------------------------
MY MULT:   1212
NATIVE JS: 1212
-----------------------------------------------
MY ADD:    407
NATIVE JS: 407
-----------------------------------------------
MY MINUS:    401
NATIVE JS: 401
-----------------------------------------------
MY DIV:    134.66666666666666666
NATIVE JS: 134.66666666666666 

Additional Notes

Negative numbers are supported simply by appending the string number with a '-' sign. Leading and Trailing zeros are permitted in entered numbers.