console.log("Script loading begins");
let no_match_counter = 0;
let match_counter = 0;
const match_string = "Test String";
let counter = 0;
/** Returns the OutputResult type object
* @param {InputResult} inputResult
* @returns {OutputResult}*/
export function onResults(inputResult) {
console.log("onResult called count: ", counter);
counter++; // select first decode for first tool
if (inputResult.tool_results[0].decodes[0].value === match_string) {
match_counter++;
} else {
no_match_counter++;
console.error("No match string found");
return {
common: "Match count: " + match_counter + " No match count: " + no_match_counter
};
}
console.log("Script loading end")