Really nice modularisation of all your code, but you're search function relies on the food variable to work, so testing it you would also have to require in food - maybe pass it as a second variable to the function (JSONToSearchThrough?) and then you've got a nice neat, easily testable function.
Really nice modularisation of all your code, but you're search function relies on the
food
variable to work, so testing it you would also have to require in food - maybe pass it as a second variable to the function (JSONToSearchThrough
?) and then you've got a nice neat, easily testable function.