{"size": 519, "ext": "js", "max_stars_repo_path": "src/reconciliationService/worker.js", "max_stars_repo_name": "leonardstruck/reconcisle", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/reconciliationService/worker.js", "max_issues_repo_name": "leonardstruck/reconcisle", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/reconciliationService/worker.js", "max_forks_repo_name": "leonardstruck/reconcisle", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.5652173913, "max_line_length": 61, "alphanum_fraction": 0.732177264}
const { workerData, parentPort } = require("worker_threads");
const path = require("path");

const Fuse = require(path.resolve(
	workerData.dirPath,
	"node_modules",
	"fuse.js"
));

const data = workerData.data;
const SearchColumn = workerData.SearchColumn;
const query = workerData.query;
const limit = workerData.limit;

//Setup Fuse.js Fuzzy Searching
const fuse = new Fuse(data, {
	keys: [SearchColumn],
	includeScore: true,
});

const result = fuse.search(query, { limit: limit });
parentPort.postMessage(result);
