Fermat's probabilistic primality test.
const fermat = require('fermat');
fermat(7);
// => true
fermat(561);
// => true (not actually prime though)
$ npm install fermat
const fermat = require('fermat');
fermat(n)
Returns true
if n
is probably prime. Returns false
otherwise. n
can be
either a Number or a String.