4.0.2 • Published 6 months ago

find-prime v4.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 months ago

find-prime

Find a prime.

Example

var findPrime = require('find-prime');

findPrime(100, function(error, prime) {
  console.log(prime.toString());
  // => '1191049104492544277555931735013'
});

Installation

$ npm install find-prime

API

var findPrime = require('find-prime');

findPrime(bits, [options], callback)

Searches for a possible prime number of size bits. Calls callback(error, bigint) when a candidate has been found. bigint is an instance of bigi.

Through the optional options Object, you can set the maximum amount of time to block the main thread (options.maxBlockTime) and the number of Miller-Rabin tests to run (options.millerRabinTests).

4.0.2

6 months ago

4.0.1

7 months ago

4.0.0

8 months ago

3.0.2

1 year ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.2

4 years ago

1.1.1

7 years ago

1.1.0

8 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago