UNPKG

website-validator

Version:
12 lines 550 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)); 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