Skip to content

Repo to showcase that node.js suffers from global leaks just like the browser does - was a surprise to me

Notifications You must be signed in to change notification settings

balupton/node-globals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Node Globals

This repo showcases hat if you forget a var keyword in Node.js, it'll leak the variable into a global variable, accessible from other files and modules too! Just like it would in the browser!

Why?

Why did I even bother doing this? I write CoffeeScript, which ensures all variables are locally scoped, so I never realised this behavour actually occurs within node, so was surprised when it did. Perhaps my fault? Maybe. But at least, using CoffeeScript means I never have to worry about this, perhaps time to give CoffeeScript a go?

Run

node one.js

About

Repo to showcase that node.js suffers from global leaks just like the browser does - was a surprise to me

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published