1.0.1 • Published 10 months ago

is-prime-100 v1.0.1

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

is-prime-100-js: JS Port Of A Revolutionary O(1) Algorithm for Prime Detection

Install (npm).

Read more in-depth information in original Python repository

API

import isPrime from "is-prime-100";

console.log(isPrime(1)); // false
console.log(isPrime(2n)); // true, and also works with BigInt's!
// ...
console.log(isPrime(121)); // false
console.log(isPrime(503)); // true

Sadly, current implementation can't handle numbers bigger than 500_000. Our team of scientists is working on that.

1.0.1

10 months ago

1.0.0

10 months ago