0.0.1 • Published 7 years ago
fast-primes v0.0.1
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 validateRun all tests
npm run testRun all benchmarks
npm run benchmarkBuild production
npm run build-prod0.0.1
7 years ago