prime-finder
v1.0.1
Published
Find all prime numbers in a given range.
Downloads
2
Readme
Prime Finder
Find all prime numbers in a given range.
Usage
npm install prime-finder
import { findPrimes } from 'prime-finder';
findPrimes({ limit: 1000000000, log: true, timePrecision: 2 });
Options
Options should be passed as an object to findPrimes
.
limit
- upper bound of the range. Default = 999start
- lower bound of the range. Default = 1timePrecision
- number of decimal places to show in time stamps. Default = 3log
- log a console message each time a new prime is found. Default = falselogAllOnFish
- iterates through all primes found upon completion. Default = false
Note: logs will slow down how fast new numbers are discovered.