documentcloud/underscore — pull request #335 by tonylukasavage (2011-10-18 14:54:23+00:00)
Title: Add support for CommonJS implementations that do not support modules.expo

Add support for CommonJS implementations that do not support modules.exports.

I'd like to highlight underscore.js for a screencast with Appcelerator Titanium, but in its current state we cannot load it as a module since we do not support the `module.exports` object. Adding _ to the standard `exports` object would expose underscore in a similar modular fashion, and could be used in our apps like this:

var _ = require('underscore')._;

It's not perfect, but we are really pushing CommonJS development and would ove to be able to include underscore.js in some of our work.