src/commonjsify.js
function browserifyTransform(file) {
    var chunks = [];

    var write = function(buffer) {
      chunks.push(buffer);
    };

    var end = function() {
      var content = Buffer.concat(chunks).toString('utf8');
      // convention fileName == key for shim options
      var fileName = file.match(/([^\/]+)(?=\.\w+$)/)[0];
      this.queue(commonjsify(content, options[fileName]));
      this.queue(null);
    };

    return through(write, end);
  }
function browserifyTransform(file) {
    var chunks = [];

    var write = function(buffer) {
      chunks.push(buffer);
    };

    var end = function() {
      var content = Buffer.concat(chunks).toString('utf8');
      // convention fileName == key for shim options
      var fileName = file.match(/([^\/]+)(?=\.\w+$)/)[0];
      this.queue(commonjsify(content, options[fileName]));
      this.queue(null);
    };

    return through(write, end);
  }
function browserifyTransform ( file ) { var chunks = [ ] ; var write = function ( buffer ) { chunks . push ( buffer ) ; } ; var end = function ( ) { var content = Buffer . concat ( chunks ) . toString ( 'utf8' ) ; // convention fileName == key for shim options var fileName = file . match ( / ([^\/]+)(?=\.\w+$) / ) [ 0 ] ; this . queue ( commonjsify ( content , options [ fileName ] ) ) ; this . queue ( null ) ; } ; return through ( write , end ) ; }
The function Browserify will use to transform the input.
@param   {string} file
@returns {stream}
The function Browserify will use to transform the input .