andywer/threads.js

View on GitHub
src/master/register.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { Worker as WorkerImplementation } from "./index"

declare const window: any

if (typeof global !== "undefined") {
  (global as any).Worker = WorkerImplementation
} else if (typeof window !== "undefined") {
  (window as any).Worker = WorkerImplementation
}