UNPKG

is-prime-npm-package

Version:
31 lines (17 loc) 678 B
# is-prime-npm-package NPM package to check if given number is prime or not # Demo Link: https://stackblitz.com/edit/js-lfhgdv?file=index.js # Installation Command : npm i is-prime-npm-package # Usage import isPrime from 'is-prime-npm-package' let value = isPrime(10); The function returns true if given number is prime The function returns false if given number is not prime The function returns "1 is neither prime nor composite number" if given number is 1 # Contributor Mayur Kode - https://www.linkedin.com/in/mayurkode/ # Support If you like my work and found this utility useful, you can buy me a coffee at UPI: mayurkode@icici