I saw something like this today
var Visualizer = (function() { function Visualizer() { //... } Visualizer.prototype.function1 = function () {
In case there will be a lot of Visualizers, function1 will be same instance in all of them. As discussed here IIFE method leaks.