module.exports = do ->
self = {}
instances_counter = 0
self.constructor = ->
unless @ instanceof self.constructor
return new (Function.prototype.bind.apply(self.constructor, [null].concat(Array.prototype.slice.call(arguments))))
@id = ++ instances_counter
self.render = ->
console.log @id
self.constructor.prototype = self
return self.constructor
a = module.exports()
a.render()
b = module.exports()
b.render()
2015-03-16, Хрень
P.S. Присылайте криптовалюту если вам нравится то, что я делаю.
Если не нравится - тоже присылайте.
LTC (Litecoin): LLN6X2uV1iuQ1e4tdmQZsf2RRwh4pxPSej
Если не нравится - тоже присылайте.
LTC (Litecoin): LLN6X2uV1iuQ1e4tdmQZsf2RRwh4pxPSej