In my project, I've used a variety of strategies for helper functions.
Extra methods on a view or a model.
var MyView = Backbone.View.extend({
initialize: function(){...},
render: function(){...},
helper: function(){...}
});
Use a helper module.
var myHelpers = {
foo: function(){...},
bar: function(){...},
baz: function(){...}
};
Extend an existing lib.
jQuery.fn.foo = function(){...};
Use an IIFE (best for functions you'd like to keep private)
var MyView = Backbone.View.extend({
initialize: function(){...},
render: function(){...},
myMethod: (function(){
function helper(){...}
return function(){
// do stuff here, using helper()
}
})()
});
Also, if you're not working in node.js which automatically provides a module system, it's worth using some strategy, such as browserify or requirejs, to export and import modules in a sane way, rather than having everything hang off the global namespace.