flatiron/plates — Issue #22: clientside namespace pollution
Author: Phoscur
Created: 2012-01-16 11:32:12+00:00
State: open

;var Plates = (typeof process !== 'undefined' && ~process.title.indexOf('node')) ? exports : {};
This checks if running in node and if yes, uses exports else it just creates a new empty object on the global namespace called Plates.
Well I don't want this global variable, and I'm using a custom require() function to use node code on the client side. Libraries are bundled into one file, including Plates, which does not export, as process is not defined.

Maybe you could just check for exports and or require to be defined and if yes use it, I don't want to create a process shim.