Quash jshint warning about specific function-in-loop creation