declaring objects in root scope of nodejs/commonjs modules - to var or not to var?

Maybe it's habit, or perhaps it's for consistency, but why is var used in the root scope of a module so much (many code examples show it)? Is it really necessary? I mean the module is root scope so whether you declared a variable with or without var, your attaching it to the same object in both situations, right? You aren't cluttering up any namespace, no?

qs = require('querystring'); // looks better than

var qs = require('querystring'); // right?

The reason is that Common JS modules are not only used in node.js but also in a variety of other environments.

Many Common JS modules can be used in browsers as well. Each module gets its own function wrapper to isolate it from other modules. In that case it's necessary to use var so that you don't accidentally leak into the global scope.

That being said most developers prefer to use var explicitly in their code for the following reasons:

  1. It's a good programming practice. Seriously, programming is all about practice. I'm so used to declaring variables using var that I often find myself using var declarations in C/C++ and then have the compiler cry at me.
  2. Variables declared using var cannot be deleted using the delete operator. Sometimes I purposely omit var in global variables so that I can delete them later and operate in "ninja mode".