Skip to content

hero-programmers/is-prime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-prime NPM Version

Is 57 a prime number? hopefully, { prime: false }

Install

Install with npm

$ npm install @hprogrammers/is-prime

How to use it

import isPrime from '@hprogrammers/is-prime';

isPrime(1); // { prime: false }
isPrime(2); //{ prime: true }
isPrime(3); // { prime: true }

About

This is also a 1009% (as 1000 is not a prime) serious project like the is-even project. Currently it can't check all the prime numbers, hopefully someday it will...

N.B: It's not recommended to use this package anywhere on your code, please use a proper algorithm.

Contributing

Prime not listed? We know. Wanna add it? Open an issue or PR - we're always looking for more primes to add to our database!

Read the Contributing Guidelines

Author

Hero Programmers YouTube Channel Subscribers

License

Copyright © 2026, Hero Programmers. Released under the MIT License.

About

Is 57 a prime number?

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors