UNPKG

website-validator

Version:
14 lines 637 B
import url from "url"; import path from "node:path"; import { withWorkerThreads } from "with-worker-threads"; const __dirname = path.dirname(url.fileURLToPath(import.meta.url)); // TODO: remove when there are no more warnings process.env["NODE_NO_WARNINGS"] = "1"; export const withPool = (concurrency) => withWorkerThreads({ validateFile: (tasker) => (...args) => tasker(args), getLinks: (tasker) => (...args) => tasker(args), checkLink: (tasker) => (...args) => tasker(args), })(path.resolve(__dirname, "worker.js"), { ...(concurrency === undefined ? {} : { concurrency }), }); //# sourceMappingURL=worker-runner.js.map