Skip to content

Latest commit

 

History

History
73 lines (49 loc) · 1.68 KB

File metadata and controls

73 lines (49 loc) · 1.68 KB

Contributing to is-prime

First off, thank you for considering contributing to is-prime!

How Can I Contribute?

Reporting Bugs

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)

Suggesting Enhancements

Enhancement suggestions are tracked as GitHub issues. Some ideas:

  • Add support for more prime numbers
  • Add documentation for numbers we haven't tested yet

Pull Requests

  1. Fork the repo
  2. Create your feature branch (git checkout -b feature/more-primes)
  3. Commit your changes (git commit -m 'Add more primes')
  4. Push to the branch (git push origin feature/more-primes)
  5. Open a Pull Request

Development

Prerequisites

  • Bun
  • TypeScript 5+

Setup

$ git clone https://github.com/hero-programmers/is-prime.git
$ cd is-prime
$ bun install

How to add new primes?

  • Open the index.ts file
  • 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

Testing

$ bun test

Code of Conduct

  • 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

Questions?

Feel free to open an issue or reach out to us on Discord