Skip to content

staghouse/fast-primes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fast-primes

A suite of JS functions to find prime numbers

The Challenge

Write your own function inside of src/index.js. Run the npm run validate command to test and benchmark your code against the stable. If all tests pass and the benchmark improves over the stable then PR!

Usage

const { isPrime, findPrime } = require('fast-primes');

isPrime(6);
// return Boolean: false

findPrime(6, 47, 808689);
// return Array: [
//     { number: 6, isPrime: false },
//     { number: 47, isPrime: true },
//     { number: 808689, isPrime: false },
// ];

Development

Minify, test and benchmark (if tests pass) stable and working

npm run validate

Run all tests

npm run test

Run all benchmarks

npm run benchmark

Build production

npm run build-prod

About

A suite of functions to find prime numbers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published