Skip to content

Instantly share code, notes, and snippets.

@billautomata
Last active December 11, 2015 20:54
Show Gist options
  • Save billautomata/ead7e9ade268de0b4c5f to your computer and use it in GitHub Desktop.
Save billautomata/ead7e9ade268de0b4c5f to your computer and use it in GitHub Desktop.
where does this break down?
module.exports = function a(){
var some_variable = 'foo'
function foo(){ console.log(some_variable) }
return {
foo: foo
}
}
a.prototype.__proto__.bar = function(){ console.log('bar') } // the thing standard complains about
var p = require('./lib.js')()
p.foo() // works, of course
p.bar() // works, too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment