Socket
Book a DemoInstallSign in
Socket

number-math

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

number-math

math operations

unpublished
latest
Source
npmnpm
Version
1.0.17
Version published
Maintainers
1
Created
Source

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

  • repunitNumber(target) // Gets the repunit number of the given target

  • triangleNumber(target) // Gets the list of all triangle number between 1 - target

  • fizz(target) // Gets the fizzbuzz sequence from 1 - target

  • amicableNumber(target) // Is number amicable or not

  • perfectNumber(target) // Is number perfect or not

  • pythagoreanTriplets(targets) // Gets the products of the pythagorean triplets if there are any else return -1

  • TruncatedNumbers(target) // remove the last digit of the number until only one remains, returns a list of all numbers

FAQs

Package last updated on 04 Mar 2024

Did you know?

Socket

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.

Install

Related posts