Correct syntax to preserve javascript context with prototyping
<p>So I know that I can fix the scope of my module class below using <code>bind</code> as in <a href="http://stackoverflow.com/a/1441692/148998">this answer</a>.</p>

<p>The only thing is that I use a slightly diffrerent syntax for my module and I am not quite sure how to apply it? </p>

<p>My question is then, how do I apply bind to my function correctly so that the context of <code>this</code> is my module?</p>

<p>Code:</p>

<pre><code>var module = (function () {

    var module = function (name) {

        this.getName= function() {
            return name;
        }

    };

    module.prototype = {

        something: function () {
            // my function needs to access getName from here...
        }
    };

    return module;
})();
</code></pre>

<p>Usage:</p>

<pre><code>var foo = module('nameValue');
foo.something();
</code></pre>
