
Security News
Socket Security Analysis Is Now One Click Away on npm
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.
number-math
Advanced tools
number-math is a JavaScript math package.
How to use: 1.
```
npm i number-math
```
2.
```
import <anyname1> from './index.js'
const <anyname2> = new <anyname1>();
<anyname2>.somefunction();
```
Function description:
getFactorial() // Gets the factorial of the number
isPrimes() // Is the number a prime
getFactors() // Gets all of the factors of that number
isRational() // Is number Rational or Irrational
changeBases(, ) // Changes a given number to a given base like base2 01001 for example
getFib() // Gets the Fibonacci sequence within a given limit
isAbundant() // Is number abundant or deficient
getCollatz() // Gets the Collatz sequence ends at 1
negativeExponent(, ) // Gets the negative exponent of a given base and exponent
isInteresting() // Is a number Interesting or Uninteresting, check out the Interesting number Paradox on Wikipedia text
floating(, ) // This function will make it so 0.1 + 0.2 actually equals 0.3 and not 0.30000004
isEven() // is Number even or odd
pentagonNumber(target) // gets a list of all pentagon numbers from 1 - target
FAQs
math operations
The npm package number-math receives a total of 0 weekly downloads. As such, number-math popularity was classified as not popular.
We found that number-math demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.