Category Archives: nodejs

code share with Node.js and the browser

While working in JavaScript I like to execute my code through Node.js from my editors terminal for quick testing. Unfortunately the usual pattern of wrapping code doesn’t quite work: 123(function(window, undefined) {     // code here… })(window); Luckily the fix was pretty simple. By replacing window with this we have access to the Node.js [...]