Skip to content

Instantly share code, notes, and snippets.

@Qard
Created October 8, 2014 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Qard/6ecd272079d144854a9a to your computer and use it in GitHub Desktop.
Save Qard/6ecd272079d144854a9a to your computer and use it in GitHub Desktop.
I am a monster.
var Emitter = require('events').EventEmitter
var evil = new Emitter
evil.on('foo', function (get) {
console.log('privateThing is', get('privateThing'))
})
function foo () {
var privateThing = 'secret'
evil.emit('foo', function (prop) {
return eval(prop)
})
}
foo()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment