0.0.3 • Published 1 year ago

prime-faster-ts v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

prime-faster-ts

A faster prime number generator in TypeScript

Usage

import { primeFaster } from 'prime-faster-ts';

const primes = primeFaster.getPrimes(0, 10000);
console.log(primes);

const n = 1000;
if (primeFaster.isPrime(n)) {
    console.log(`${n} is a prime number`);
} else {
    console.log(`${n} is not a prime number`);
}

Benchmark and Test

$ npm run test

License

MIT License © 2022 Takahashi Akari

0.0.3

1 year ago

0.0.2

1 year ago