UNPKG

noscrape

Version:
17 lines 609 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getBinaryPath = void 0; const os_1 = require("os"); const path_1 = require("path"); const node_fs_1 = require("node:fs"); const getBinaryPath = () => { const os = (0, os_1.platform)(); const ar = (0, os_1.arch)(); const binaryPath = (0, path_1.join)(__dirname, "..", "bin", `noscrape_${os}_${ar}`); if ((0, node_fs_1.existsSync)(binaryPath)) { return binaryPath; } throw new Error("os/arch not supported"); }; exports.getBinaryPath = getBinaryPath; //# sourceMappingURL=get_binary_path.js.map