N"OWw RIWWITNHK AAAAAARR DER PROTOROPYTEP PORPERTY>111..
Unfolded:

events = require "events"

instances_counter = 0
module.exports = (
  -> 
    __class = (-> 
      __args = Array.prototype.slice.call(arguments)
      if @ instanceof __class
        @constructor?.apply(@,__args) if __class isnt @constructor;@
      else 
        new (Function.prototype.bind.apply(__class,[null].concat(__args)))
    );
    __class.prototype = if @prototype? then Object.create(@prototype.prototype) else @;
    __class.prototype[__prop] = @[__prop] for __prop of @ if @prototype?;
    __class).apply

  prototype: events.EventEmitter

  constructor: (@param1,@param2) ->
    @prototype.apply @
    @id = ++instances_counter

  render: ->
    console.log @,instances_counter,@ instanceof module.exports

a = new module.exports()
a.render()
b = new module.exports()
b.render()
console.log a instanceof events.EventEmitter
console.log a instanceof module.exports

Folded:

events = require "events"

instances_counter = 0
module.exports = (-> __class = (-> __args = Array.prototype.slice.call(arguments); if @ instanceof __class then @constructor?.apply(@,__args) if __class isnt @constructor;@ else new (Function.prototype.bind.apply(__class,[null].concat(__args)))); __class.prototype = (if @prototype? then Object.create(@prototype.prototype) else @); (__class.prototype[__prop] = @[__prop] for __prop of @ if @prototype?); __class).apply

  prototype: events.EventEmitter

  constructor: (@param1,@param2) ->
    @prototype.apply @
    @id = ++instances_counter

  render: ->
    console.log @,instances_counter,@ instanceof module.exports

a = new module.exports()
a.render()
b = new module.exports()
b.render()
console.log a instanceof events.EventEmitter
console.log a instanceof module.exports
[ ]
 

HTC Wildfire S a510e 320x480

 
root_directory_listing.sort (a,b) -> 
  a.substr(0,(~-a.lastIndexOf(".") >>> 0) + 1).length - 
  b.substr(0,(~-b.lastIndexOf(".") >>> 0) + 1).length
[ ]
 

- Товарищ генерал, тоби пакет.
- Не "тоби", а "Вам".
- А на хуя вин мни?

- Товарищ генерал, ваше приказание выполнено.
- А я ничего не приказывал.
- А я ни хуя и не сделал.

Генерал подходит к часовому.
- Почему честь не отдаете?
- А кто ты такой?
- Как, ты не знаешь, кто я такой?
Часовой в казарме:
- Ребята, тут какой-то старый козел пришел, так он даже не знает, кто он такой.

Code:


  

First call:

  

Second call:

Array ( [a] => Array ( [name] => Array ( [0] => PETROLEUM ) ) ) 
npm list co
[ ]
 

Folded:

instances_counter = 0
module.exports = ( -> __class = (-> __args = Array.prototype.slice.call(arguments); if @ instanceof __class then @constructor?.apply(@,__args);@ else new (Function.prototype.bind.apply(__class,[null].concat(__args)))); __class.prototype = @; __class).apply

  constructor_not_required_anymore: (@param1,@param2) ->
    console.log "cnstar"
    @id = ++instances_counter

  render: ->
    console.log @,instances_counter,@ instanceof module.exports

Unfolded:

instances_counter = 0
module.exports = (
  -> 
    __class = (-> 
      __args = Array.prototype.slice.call(arguments)
      if @ instanceof __class 
        @constructor?.apply(@,__args);@
      else 
        new (Function.prototype.bind.apply(__class,[null].concat(__args)))
    );
    __class.prototype = @;
    __class).apply

  constructor_not_required_anymore: (@param1,@param2) ->
    console.log "cnstar"
    @id = ++instances_counter

  render: ->
    console.log @,instances_counter,@ instanceof module.exports
[ ]
 

Bartender says, "Sorry, we don't serve faster-than-light particles here."

Tachyon walks into a bar.

[ ]
 

Folded:

instances_counter = 0
module.exports = (-> __constructor = (-> if @ instanceof __constructor then @constructor.apply(@,Array.prototype.slice.call(arguments)) else new (Function.prototype.bind.apply(__constructor,[null].concat(Array.prototype.slice.call(arguments))))); __constructor.prototype = @; __constructor).apply

  constructor: (@param1,@param2) ->
    console.log "cnstar"
    @id = ++instances_counter

  render: ->
    console.log @,instances_counter,@ instanceof module.exports

Unfolded:

instances_counter = 0
module.exports = (
  -> 
    __constructor = (-> 
      __args = Array.prototype.slice.call(arguments)
      if @ instanceof __constructor 
        @constructor.apply(@,__args) 
      else 
        new (Function.prototype.bind.apply(__constructor,[null].concat(__args)))
    );
    __constructor.prototype = @;
    __constructor).apply

  constructor: (@param1,@param2) ->
    console.log "cnstar"
    @id = ++instances_counter

  render: ->
    console.log @,instances_counter,@ instanceof module.exports

Testing:

Class2 = require './class2'

a = Class2('a1','a2')
b = new Class2('b1','b2')
a.render()
b.render()
console.log a instanceof Class2
console.log b instanceof Class2

Output:

$ coffee class3.coffee 
cnstar
cnstar
{ param1: 'a1', param2: 'a2', id: 1 } 2 true
{ param1: 'b1', param2: 'b2', id: 2 } 2 true
true
true
[ ]
 
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()
[ ]