fast-primes
v0.0.1
Published
A suite of JS functions to find prime numbers
Downloads
3
Readme
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