Skip to content

Jahans3/prime-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 = 999
  • start - lower bound of the range. Default = 1
  • timePrecision - number of decimal places to show in time stamps. Default = 3
  • log - log a console message each time a new prime is found. Default = false
  • logAllOnFish - iterates through all primes found upon completion. Default = false

Note: logs will slow down how fast new numbers are discovered.

About

Find all primes in a given range

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published