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

bestmath

v1.1.1

Published

numers are array for more bigger number

Downloads

4

Readme

bettermath

introduction

the safer integer in js is 9007199254740991.

we can see this number big but I was limited for my RSA system. So I've reinvent the number in js: number are array. Each numberarray are compose like this

// realnumber:
let mynum = 23
// arraynumber:
let mynum = [3,2]

the number are reverst because it's more easier to manipuling this. But don't worry using the transform and intoString methods you havn't to read inverse Array of number

example

const bmath = require("bettermath")
let num1 = bmath.transform(9007199254740991)
let num2 = bmath.add(num1, bmath.transform(1) /* or [1]*/)
console.log(bmath.intoString(num2)) // return 9007199254740992
console.log(bmath.isEqual(num1, num2)) // return false

docs

.transform

return a Array

transform number in to Array ex:

bmath.transform(45) // return [5, 4]

.add

return an Array

add tu Arraynumber ex:

bmath.add([5, 4], (5, 4)) // returnn [0, 9]

.intoString

return a String

transform Arraynumber in String ex:

bmath.intoString([5, 4])// return 45

.intoNumber

exactly like intoString but it's return Number can be NaN and Infinite

.isInferieur .isSuperieur .isEqual

for compare to Arraynumber

return boolean ex:

bmath.isEqual([5, 4],[5, 4]) // return true

.reduce

reduce Arraynumber with 0 useless

return an Array

bmath.reduce([1,0]) // return [1]

.sub

substract 2 Arraynumber

return an Array ex:

bmath.sub([5, 4], [1]) // return [4, 4]

.mul

multiply 2 Arraynumber

return an Array ex:

bmat.mul([2],[3]) // return 6

.div

divide to number (euclidienne)

return an object like this {result:[x], modulo:[x]} ex:

bmat.div([4],[3]) // return {result: [1], modulo:[1]}

WARNING this project accept juste positive and not comma number

if you want to add somthing to the project go on github and good luck because this are brainfuck.