UNPKG

409 BJavaScriptView Raw
1// Webpack hack
2// tslint:disable no-eval
3let implementation;
4function selectImplementation() {
5 return typeof __non_webpack_require__ === "function"
6 ? __non_webpack_require__("worker_threads")
7 : eval("require")("worker_threads");
8}
9export default function getImplementation() {
10 if (!implementation) {
11 implementation = selectImplementation();
12 }
13 return implementation;
14}