module.exports = (function(){
var prototype = {}
var instances_counter = 0
prototype.constructor = function()
{
if(!(this instanceof prototype.constructor))
{
return new (Function.prototype.bind.apply(prototype.constructor, [null].concat(Array.prototype.slice.call(arguments))))
}
this.id = ++instances_counter
}
prototype.render = function()
{
console.log(this.id)
}
prototype.constructor.prototype = prototype
return prototype.constructor
})()
http://stackoverflow.com/questions/2856059/passing-an-array-as-a-function-parameter-in-javascript
http://stackoverflow.com/questions/3914557/passing-arguments-forward-to-another-javascript-function