function buildNav(members) {
  const nav = [];
  // merge namespaces and classes, then sort
  const merged = members.modules.concat(members.classes);
  merged.sort(function(a, b) {
    if (a.longname > b.longname) {
      return 1;
    }
    if (a.longname < b.longname) {
      return -1;
    }
    return 0;
  });
  _.each(merged, function(v) {
    // exclude interfaces from sidebar
    if (v.interface !== true) {
      if (v.kind == 'module') {
        nav.push({
          type: 'module',
          longname: v.longname,
          name: v.name,
          members: find({
            kind: 'member',
            memberof: v.longname
          }),
          methods: find({
            kind: 'function',
            memberof: v.longname
          }),
          typedefs: find({
            kind: 'typedef',
            memberof: v.longname
          }),
          events: find({
            kind: 'event',
            memberof: v.longname
          })
        });
      }
      if (v.kind == 'class') {
        nav.push({
          type: 'class',
          longname: v.longname,
          name: v.name,
          members: find({
            kind: 'member',
            memberof: v.longname
          }),
          methods: find({
            kind: 'function',
            memberof: v.longname
          }),
          typedefs: find({
            kind: 'typedef',
            memberof: v.longname
          }),
          fires: v.fires,
          events: find({
            kind: 'event',
            memberof: v.longname
          })
        });
      }
    }
  });
  return nav;
}
function buildNav(members) {
  const nav = [];
  // merge namespaces and classes, then sort
  const merged = members.modules.concat(members.classes);
  merged.sort(function(a, b) {
    if (a.longname > b.longname) {
      return 1;
    }
    if (a.longname < b.longname) {
      return -1;
    }
    return 0;
  });
  _.each(merged, function(v) {
    // exclude interfaces from sidebar
    if (v.interface !== true) {
      if (v.kind == 'module') {
        nav.push({
          type: 'module',
          longname: v.longname,
          name: v.name,
          members: find({
            kind: 'member',
            memberof: v.longname
          }),
          methods: find({
            kind: 'function',
            memberof: v.longname
          }),
          typedefs: find({
            kind: 'typedef',
            memberof: v.longname
          }),
          events: find({
            kind: 'event',
            memberof: v.longname
          })
        });
      }
      if (v.kind == 'class') {
        nav.push({
          type: 'class',
          longname: v.longname,
          name: v.name,
          members: find({
            kind: 'member',
            memberof: v.longname
          }),
          methods: find({
            kind: 'function',
            memberof: v.longname
          }),
          typedefs: find({
            kind: 'typedef',
            memberof: v.longname
          }),
          fires: v.fires,
          events: find({
            kind: 'event',
            memberof: v.longname
          })
        });
      }
    }
  });
  return nav;
}
function buildNav ( members ) { const nav = [ ] ; // merge namespaces and classes, then sort const merged = members . modules . concat ( members . classes ) ; merged . sort ( function ( a , b ) { if ( a . longname > b . longname ) { return 1 ; } if ( a . longname < b . longname ) { return - 1 ; } return 0 ; } ) ; _ . each ( merged , function ( v ) { // exclude interfaces from sidebar if ( v . interface !== true ) { if ( v . kind == 'module' ) { nav . push ( { type : 'module' , longname : v . longname , name : v . name , members : find ( { kind : 'member' , memberof : v . longname } ) , methods : find ( { kind : 'function' , memberof : v . longname } ) , typedefs : find ( { kind : 'typedef' , memberof : v . longname } ) , events : find ( { kind : 'event' , memberof : v . longname } ) } ) ; } if ( v . kind == 'class' ) { nav . push ( { type : 'class' , longname : v . longname , name : v . name , members : find ( { kind : 'member' , memberof : v . longname } ) , methods : find ( { kind : 'function' , memberof : v . longname } ) , typedefs : find ( { kind : 'typedef' , memberof : v . longname } ) , fires : v . fires , events : find ( { kind : 'event' , memberof : v . longname } ) } ) ; } } } ) ; return nav ; }
Create the navigation sidebar.
@param {object} members The members that will be used to create the sidebar.
@param {Array<Object>} members.classes Classes.
@param {Array<Object>} members.externals Externals.
@param {Array<Object>} members.globals Globals.
@param {Array<Object>} members.mixins Mixins.
@param {Array<Object>} members.modules Modules.
@param {Array<Object>} members.namespaces Namespaces.
@param {Array<Object>} members.tutorials Tutorials.
@param {Array<Object>} members.events Events.
@return {string} The HTML for the navigation sidebar.
Create the navigation sidebar .
Build the nav array from members