UNPKG
@chainsafe/threads
Version:
latest (1.11.3)
1.11.3
1.11.2
1.11.1
1.11.0
1.10.0
1.9.0
1.8.0
Web workers & worker threads as simple as a function call
threads.js.org
andywer/threads.js
@chainsafe/threads
/
dist-esm
/
master
/
register.js
8 lines
(7 loc)
•
225 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
import
{
Worker
as
WorkerImplementation
}
from
"./index"
;
if
(
typeof
global
!==
"undefined"
) {
global
.
Worker
=
WorkerImplementation
; }
else
if
(
typeof
window
!==
"undefined"
) {
window
.
Worker
=
WorkerImplementation
; }