mdox.js
function (obj, opts) {
  var toc = [];

  // Finesse comment markdown data.
  // Also, statefully create TOC.
  var sections = _.chain(obj)
    .map(function (data) { return new Section(data, opts); })
    .filter(function (s) { return s.isPublic(); })
    .map(function (s) {
      toc.push(s.renderToc());  // Add to TOC.
      return s.renderSection(); // Render section.
    })
    .value()
    .join("\n");

  // No Output if not sections.
  if (!sections) {
    return "";
  }

  return "\n" + toc.join("") + "\n" + sections;
}
function (obj, opts) {
  var toc = [];

  // Finesse comment markdown data.
  // Also, statefully create TOC.
  var sections = _.chain(obj)
    .map(function (data) { return new Section(data, opts); })
    .filter(function (s) { return s.isPublic(); })
    .map(function (s) {
      toc.push(s.renderToc());  // Add to TOC.
      return s.renderSection(); // Render section.
    })
    .value()
    .join("\n");

  // No Output if not sections.
  if (!sections) {
    return "";
  }

  return "\n" + toc.join("") + "\n" + sections;
}
function ( obj , opts ) { var toc = [ ] ; // Finesse comment markdown data. // Also, statefully create TOC. var sections = _ . chain ( obj ) . map ( function ( data ) { return new Section ( data , opts ) ; } ) . filter ( function ( s ) { return s . isPublic ( ) ; } ) . map ( function ( s ) { toc . push ( s . renderToc ( ) ) ; // Add to TOC. return s . renderSection ( ) ; // Render section. } ) . value ( ) . join ( "\n" ) ; // No Output if not sections. if ( ! sections ) { return "" ; } return "\n" + toc . join ( "" ) + "\n" + sections ; }
Generate MD API from `dox` object.
Generate MD API from dox object .