lib/toc.js
function normalize(options, templates) {
  // Options override defaults and toc methods.
  var result = _.defaults({}, options, toc, toc.defaults);
  // Remove "core" methods from result object.
  ['defaults', 'process', 'anchorize', 'toc'].forEach(function(prop) {
    delete result[prop];
  });
  // Compile Lodash string templates into functions.
  (templates || []).forEach(function(tmpl) {
    if (typeof result[tmpl] === 'string') {
      result[tmpl] = _.template(result[tmpl]);
    }
  });
  return result;
}
function normalize(options, templates) {
  // Options override defaults and toc methods.
  var result = _.defaults({}, options, toc, toc.defaults);
  // Remove "core" methods from result object.
  ['defaults', 'process', 'anchorize', 'toc'].forEach(function(prop) {
    delete result[prop];
  });
  // Compile Lodash string templates into functions.
  (templates || []).forEach(function(tmpl) {
    if (typeof result[tmpl] === 'string') {
      result[tmpl] = _.template(result[tmpl]);
    }
  });
  return result;
}
function normalize ( options , templates ) { // Options override defaults and toc methods. var result = _ . defaults ( { } , options , toc , toc . defaults ) ; // Remove "core" methods from result object. [ 'defaults' , 'process' , 'anchorize' , 'toc' ] . forEach ( function ( prop ) { delete result [ prop ] ; } ) ; // Compile Lodash string templates into functions. ( templates || [ ] ) . forEach ( function ( tmpl ) { if ( typeof result [ tmpl ] === 'string' ) { result [ tmpl ] = _ . template ( result [ tmpl ] ) ; } } ) ; return result ; }
Compile specified lodash string template properties into functions.
Compile specified lodash string template properties into functions .