console.log("Script loading begin");
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.tools[0].decodes[0] === match_string) {
match_counter++;
} else {
no_match_counter++;
console.error("No match string find!");
return {
common: "Match count: " + match_counter + " No match count: " + no_match_counter
};
}
console.log("Script loading end")