function returns all properties but must only return the one that was called
<p>I'm trying to write something so that I can encapsulate all my functions into one place nice and neatly and call them by there property name, but what's happening is that whenever I call one property it returns then all.</p>

<p>How do I make <code>main('test').f3;</code>  only log 'f3test' and still maintain my concept.</p>

<pre><code>var main = function (t) {

    var f1 = function () { console.log('f1' + ' ' + t); };
    var f2 = function () { console.log('f2' + ' ' + t); };
    var f3 = function () { console.log('f3' + ' ' + t); };
    var f4 = function () { console.log('f4' + ' ' + t); };
    var f5 = function () { console.log('f5' + ' ' + t); };
    var f6 = function () { console.log('f6' + ' ' + t); };
    var f7 = function () { console.log('f7' + ' ' + t); };
    var f8 = function () { console.log('f8' + ' ' + t); };


    return {
        f1: f1(),
        f2: f2(),
        f3: f3(),
        f4: f4(),
        f5: f5(),
        f6: f6(),
        f7: f7(),
        f8: f8(),
    }


}




//this
    main('test').f3; 
//will console.log
//f1test
//f2test
//f3test
//f4test
//f5test
//f6test
//f7test
//f8test
</code></pre>
