qb-factors

1.0.0 • Public • Published

qb-factors

Calculate primes and factors with caching.

install

npm install qb-factors

usage

primes(x) returns up to and including the value passed in:

let qbf = require('qb-factors')
qbf.primes(37)
> [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37 ]

factors(x) returns prime factors other than 1 and the value passed in:

qbf.factors(37)
> []

qbf.factors(88)
> [ 2, 11 ] 

Package Sidebar

Install

npm i qb-factors

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

5.66 kB

Total Files

5

Last publish

Collaborators

  • mvoss9000