// I will call this function in different places
const formUtils = {
isFullNamesEqual: (name1, name2) => {
console.log("Comparing names" , name1, " with ", name2);
return name1.trim().toLowerCase() === name2.trim().toLowerCase();
}
};
return formUtils;
In order to pass 'test1' and 'test1' to formUtils, you can remove them from line 2 in the test query and move them to additionalScope in the test query's .trigger():