1.0.5 • Published 9 months ago

@drhex/prime-x v1.0.5

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

Prime-x

A simple Node.js package to check for prime numbers and also compute prime numbers within a specified range.

Installation

You can install this package using npm:

npm install @drhex/prime-x@latest

Usage

const prime = require("@drhex/prime-x");
const lower = 30;
const upper = 59;
// Compute prime numbers within a specified range
const primesInRange = prime.computePrime(lower, upper);
console.log("Prime numbers:", primesInRange);

check if a number is a prime number.

const prime = require("@drhex/prime-x");
const number = 97;
const isPrime = prime.checkPrime(number); //returns true
console.log("The number is a prime number:", isPrime);
1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.20

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago