1.0.2 • Published 9 months ago

@thelocalgodd/isprime v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

NPM Downloads

NPM Version

Prime Number Checker

A simple package to check if a number is prime.

installation

npm i @thelocalgodd/isprime

usage

const { isPrime } = require('@thelocalgodd/isprime');

console.log(isPrime(17)); // true
console.log(isPrime(4));  // false

API

isPrime(num)

Returns true if the number is prime, false otherwise.

Parameters

  • num (number): The number to check

Returns

  • (boolean): true if the number is prime, false otherwise

License

MIT

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago