First off, thank you for considering contributing to is-prime!
Before creating bug reports, please check existing issues. When you are creating a bug report, please include as many details as possible:
- What number did you test?
- What result did you expect?
- What result did you get?
- Are you sure it's not a prime? (we can't be too careful)
Enhancement suggestions are tracked as GitHub issues. Some ideas:
- Add support for more prime numbers
- Add documentation for numbers we haven't tested yet
- Fork the repo
- Create your feature branch (
git checkout -b feature/more-primes) - Commit your changes (
git commit -m 'Add more primes') - Push to the branch (
git push origin feature/more-primes) - Open a Pull Request
- Bun
- TypeScript 5+
$ git clone https://github.com/hero-programmers/is-prime.git
$ cd is-prime
$ bun install- Open the
index.tsfile - Scroll to the bottom
- Add a new prime number check
- Change the range
- Run tests
- Commit, Push and open a Pull Request
NOTE: the same way you can update or delete a prime number
$ bun test- Make no changes to other files unless you need to
- Be kind to numbers, even the non-prime ones
- Don't make fun of numbers they are numbers too you know
- No number shaming
- 57 is prime in some parallel universes
Feel free to open an issue or reach out to us on Discord