Last active
December 11, 2015 20:54
-
-
Save billautomata/ead7e9ade268de0b4c5f to your computer and use it in GitHub Desktop.
where does this break down?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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