export function _workerUrl ( workerCode ) { workerCode = `(() => {${ workerCode }})()` ; const _blob = new Blob ( [ workerCode ] , { type : 'text/javascript' } ) ; return window . URL . createObjectURL ( _blob ) ; } let _useWorkers = false ; if ( ! IS_BROWSER ) { try { require . resolve ( 'worker_threads' ) ; _useWorkers = true ; } catch ( e ) { console . log ( `[bigint-crypto-utils] WARNING:
This node version doesn't support worker_threads. You should enable them in order to greatly speedup the generation of big prime numbers.
  · With Node >=11 it is enabled by default (consider upgrading).
  · With Node 10, starting with 10.5.0, you can enable worker_threads at runtime executing node --experimental-worker ` ) ; } } else { if ( self . Worker !== undefined ) _useWorkers = true ; } export { _useWorkers } ; export interface WorkerToMainMsg { isPrime : boolean ; value : bigint ; id : number ; } export interface MainToWorkerMsg { rnd : bigint ; iterations : number ; id : number ; }