Ninja Pirate Mutants

# npm

## array-math

1.1.3 • Public • Published

# array-math

## modularity

Sorry, I built this before I learned the truth about modularity. See the following links for enlightenment. ;-)

# aMath.factors(n)

If you only want this function, try primefactors.

• n must be a positive integer

# aMath.divisors(n[, opts])

If you only want this function, you could factor it out, and send me a PR with a link to your module! (Grab the test file while you're at it.)

• n must be a positive number.
• opts is an object with the options. Defaults to {}.
• proper can be inside opts. If true, it will make the resulting array not include n. Defaults to false.

# aMath.isPrime(n)

If you only want this function, try isprime.

• n must be a positive integer

# aMath.range([start,] stop [,step])

If you only want this function, try array-range. (Does not have stepping built in.)

• start is the starting number of the range. Defaults to 0. If there are 2 or 3 arguments, this is assumed to be the first.
• stop is the ending number of the range. Defaults to 0. If there is 1 argument, this is assumed to be it.
• step is the step between each number. Defaults to 1. This is may not be 0, and is set to 1 if it is.

# aMath.multiply(a)

If you only want this function, it might be best to just write it yourself:

• a must be an array of numbers (integers, floats, negative, whatever).

# aMath.sum(a)

If you only want this function, it might be best to just write it yourself:

• a must be an array of numbers (integers, floats, negative, whatever).

# aMath.factorial(h[, l])

If you only want this function, try factorial. (Does not have low number built in.)

• h must be a number. It is the high number. It defaults to 0.
• l must be a number. It is the low number. It defaults to 0.
While multiplying, it will never multiply by 0.

# install

Install with NPM

npm install array-math

VOL

## Keywords

### Install

npm i array-math

### Repository

github.com/ArtskydJ/array-math

### Homepage

github.com/ArtskydJ/array-math

13

1.1.3