Pryme uses the optimizations documented here.
npm i pryme
let isPrime = pryme(101) // true
import pryme from 'pryme'
let isPrime = pryme(1000000000001003)
console.log(isPrime) // true
npm i pryme -g
$ pryme 1
1 is prime? false
pryme > 101
101 is prime? true
pryme > // wait for new input
MIT