Skip to content

Instantly share code, notes, and snippets.

@eskim
Last active August 29, 2015 14:01
Show Gist options
  • Save eskim/99e18573532501285ec5 to your computer and use it in GitHub Desktop.
Save eskim/99e18573532501285ec5 to your computer and use it in GitHub Desktop.
CoffeeScript = require 'coffee-script'
xyz = ->
console.log 'xyz'
x = ->
Agent = {}
cs = """
Agent.check = ->
xyz()
Agent.receive = (e)->
xyz()
"""
js = CoffeeScript.compile(cs)
console.log js
v = eval(js)
console.log(Agent)
Agent.check()
x()
console.log 'xy'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment