threads
Version:
Web workers & worker threads as simple as a function call
18 lines (17 loc) • 508 B
JavaScript
// Webpack hack
// tslint:disable no-eval
Object.defineProperty(exports, "__esModule", { value: true });
let implementation;
function selectImplementation() {
return typeof __non_webpack_require__ === "function"
? __non_webpack_require__("worker_threads")
: eval("require")("worker_threads");
}
function getImplementation() {
if (!implementation) {
implementation = selectImplementation();
}
return implementation;
}
exports.default = getImplementation;
;