@thelocalgodd/isprime

1.0.2 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @thelocalgodd/isprime

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

3.77 kB

Total Files

6

Last publish

Collaborators

  • thelocalgodd