declare variables using "var" to prevent them from leaking into the global scope #3

merged 1 commit into from Mar 7, 2012


None yet

2 participants

fjakobs commented Feb 16, 2012

No description provided.


is this necessary? i thought node had module scope? i will pull anyway when not on mobile but it would be good to clarify this.

fjakobs commented Feb 20, 2012

They are actually leaking. They were reported by a global variable detector in our code. Node's module scope only applied to variables declared with "var" at the top level of the file. node basically wraps each module in a function.

@teknopaul teknopaul merged commit 9fa3b12 into teknopaul:master Mar 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment