template/util/index.js
function view(name, model, cb) {
  var basePath = path.join(path.dirname(__filename), '../views');
  var render = function(err, files) {
    if (err) {
      cb(err);
    }
    cb(null, mustache.render(files[0], model, {
      toctreeChildren: files[1],
      func: files[2],
      member: files[3],
      constant: files[3],
      typedef: files[5]
    }));
  };
  async.parallel(_.map([
    name,
    '_toctree-children',
    '_function',
    '_member',
    '_member',
    '_typedef'
  ], function(p) {
    return function(cb) {
      fs.readFile(path.join(basePath, p + '.mustache'), 'utf-8', cb);
    };
  }), render);
}
function view(name, model, cb) {
  var basePath = path.join(path.dirname(__filename), '../views');
  var render = function(err, files) {
    if (err) {
      cb(err);
    }
    cb(null, mustache.render(files[0], model, {
      toctreeChildren: files[1],
      func: files[2],
      member: files[3],
      constant: files[3],
      typedef: files[5]
    }));
  };
  async.parallel(_.map([
    name,
    '_toctree-children',
    '_function',
    '_member',
    '_member',
    '_typedef'
  ], function(p) {
    return function(cb) {
      fs.readFile(path.join(basePath, p + '.mustache'), 'utf-8', cb);
    };
  }), render);
}
function view ( name , model , cb ) { var basePath = path . join ( path . dirname ( __filename ) , '../views' ) ; var render = function ( err , files ) { if ( err ) { cb ( err ) ; } cb ( null , mustache . render ( files [ 0 ] , model , { toctreeChildren : files [ 1 ] , func : files [ 2 ] , member : files [ 3 ] , constant : files [ 3 ] , typedef : files [ 5 ] } ) ) ; } ; async . parallel ( _ . map ( [ name , '_toctree-children' , '_function' , '_member' , '_member' , '_typedef' ] , function ( p ) { return function ( cb ) { fs . readFile ( path . join ( basePath , p + '.mustache' ) , 'utf-8' , cb ) ; } ; } ) , render ) ; }
Generate the output string given a template name and the model.

@param  {string}       name  the template name without the extension.
@param  {object}       model the ViewModel to use with the template
@param  {viewCallback} cb callback
Generate the output string given a template name and the model .