server_example/node_modules/easyrtc/dev/scripts/client_jsdoc_templates2/publish.js
/**
 * Create the navigation sidebar.
 * @param {object} members The members that will be used to create the sidebar.
 * @param {array<object>} members.classes
 * @param {array<object>} members.externals
 * @param {array<object>} members.globals
 * @param {array<object>} members.mixins
 * @param {array<object>} members.modules
 * @param {array<object>} members.namespaces
 * @param {array<object>} members.tutorials
 * @param {array<object>} members.events
 * @return {string} The HTML for the navigation sidebar.
 */
Create the navigation sidebar.
@param {object} members The members that will be used to create the sidebar.
Create the navigation sidebar . @param { object } members The members that will be used to create the sidebar .
function buildNav(members) {
    var nav = '', 
        seen = {};
    if (members.modules.length) {
        nav += '<h3>Modules</h3><ul>';
        members.modules.forEach(function(m) {
            if ( !hasOwnProp.call(seen, m.longname) ) {
                nav += '<li>'+linkto(m.longname, m.name)+'</li>';
            }
            seen[m.longname] = true;
        });
        nav += '</ul>';
    }
    if (members.externals.length) {
        nav += '<h3>Externals</h3><ul>';
        members.externals.forEach(function(e) {
            if ( !hasOwnProp.call(seen, e.longname) ) {
                nav += '<li>'+linkto( e.longname, e.name.replace(/(^"|"$)/g, '') )+'</li>';
            }
            seen[e.longname] = true;
        });
        nav += '</ul>';
    }
    if (members.classes.length) {
        var moduleClasses = 0;
        members.classes.forEach(function(c) {
            var moduleSameName = find({kind: 'module', longname: c.longname});
            if (moduleSameName.length) {
                c.name = c.name.replace('module:', 'require("')+'")';
                moduleClasses++;
                moduleSameName[0].module = c;
            }
            if (moduleClasses !== -1 && moduleClasses < members.classes.length) {
                nav += '<h3>Classes</h3><ul>';
                moduleClasses = -1;
            }
            if ( !hasOwnProp.call(seen, c.longname) ) {
                nav += '<li>'+linkto(c.longname, c.name)+'</li>';
            }
            seen[c.longname] = true;
        });
        nav += '</ul>';
    }
    if (members.events.length) {
        nav += '<h3>Events</h3><ul>';
        members.events.forEach(function(e) {
            if ( !hasOwnProp.call(seen, e.longname) ) {
                nav += '<li>'+linkto(e.longname, e.name)+'</li>';
            }
            seen[e.longname] = true;
        });
        nav += '</ul>';
    }
    if (members.namespaces.length) {
        nav += '<h3>Namespaces</h3><ul>';
        members.namespaces.forEach(function(n) {
            if ( !hasOwnProp.call(seen, n.longname) ) {
                nav += '<li>'+linkto(n.longname, n.name)+'</li>';
            }
            seen[n.longname] = true;
        });
        nav += '</ul>';
    }
    if (members.mixins.length) {
        nav += '<h3>Mixins</h3><ul>';
        members.mixins.forEach(function(m) {
            if ( !hasOwnProp.call(seen, m.longname) ) {
                nav += '<li>'+linkto(m.longname, m.name)+'</li>';
            }
            seen[m.longname] = true;
        });
        nav += '</ul>';
    }
    if (members.tutorials.length) {
        nav += '<h3>Tutorials</h3><ul>';
        members.tutorials.forEach(function(t) {
            nav += '<li>'+tutoriallink(t.name)+'</li>';
        });
        nav += '</ul>';
    }
    if (members.globals.length) {
        nav += '<h3>Global</h3><ul>';
        members.globals.forEach(function(g) {
            if ( g.kind !== 'typedef' && !hasOwnProp.call(seen, g.longname) ) {
                nav += '<li>'+linkto(g.longname, g.name)+'</li>';
            }
            seen[g.longname] = true;
        });
        nav += '</ul>';
    }
    return nav;
}
function buildNav ( members ) { var nav = '' , seen = { } ; if ( members . modules . length ) { nav += '<h3>Modules</h3><ul>' ; members . modules . forEach ( function ( m ) { if ( ! hasOwnProp . call ( seen , m . longname ) ) { nav += '<li>' + linkto ( m . longname , m . name ) + '</li>' ; } seen [ m . longname ] = true ; } ) ; nav += '</ul>' ; } if ( members . externals . length ) { nav += '<h3>Externals</h3><ul>' ; members . externals . forEach ( function ( e ) { if ( ! hasOwnProp . call ( seen , e . longname ) ) { nav += '<li>' + linkto ( e . longname , e . name . replace ( / (^"|"$) / g , '' ) ) + '</li>' ; } seen [ e . longname ] = true ; } ) ; nav += '</ul>' ; } if ( members . classes . length ) { var moduleClasses = 0 ; members . classes . forEach ( function ( c ) { var moduleSameName = find ( { kind : 'module' , longname : c . longname } ) ; if ( moduleSameName . length ) { c . name = c . name . replace ( 'module:' , 'require("' ) + '")' ; moduleClasses ++ ; moduleSameName [ 0 ] . module = c ; } if ( moduleClasses !== - 1 && moduleClasses < members . classes . length ) { nav += '<h3>Classes</h3><ul>' ; moduleClasses = - 1 ; } if ( ! hasOwnProp . call ( seen , c . longname ) ) { nav += '<li>' + linkto ( c . longname , c . name ) + '</li>' ; } seen [ c . longname ] = true ; } ) ; nav += '</ul>' ; } if ( members . events . length ) { nav += '<h3>Events</h3><ul>' ; members . events . forEach ( function ( e ) { if ( ! hasOwnProp . call ( seen , e . longname ) ) { nav += '<li>' + linkto ( e . longname , e . name ) + '</li>' ; } seen [ e . longname ] = true ; } ) ; nav += '</ul>' ; } if ( members . namespaces . length ) { nav += '<h3>Namespaces</h3><ul>' ; members . namespaces . forEach ( function ( n ) { if ( ! hasOwnProp . call ( seen , n . longname ) ) { nav += '<li>' + linkto ( n . longname , n . name ) + '</li>' ; } seen [ n . longname ] = true ; } ) ; nav += '</ul>' ; } if ( members . mixins . length ) { nav += '<h3>Mixins</h3><ul>' ; members . mixins . forEach ( function ( m ) { if ( ! hasOwnProp . call ( seen , m . longname ) ) { nav += '<li>' + linkto ( m . longname , m . name ) + '</li>' ; } seen [ m . longname ] = true ; } ) ; nav += '</ul>' ; } if ( members . tutorials . length ) { nav += '<h3>Tutorials</h3><ul>' ; members . tutorials . forEach ( function ( t ) { nav += '<li>' + tutoriallink ( t . name ) + '</li>' ; } ) ; nav += '</ul>' ; } if ( members . globals . length ) { nav += '<h3>Global</h3><ul>' ; members . globals . forEach ( function ( g ) { if ( g . kind !== 'typedef' && ! hasOwnProp . call ( seen , g . longname ) ) { nav += '<li>' + linkto ( g . longname , g . name ) + '</li>' ; } seen [ g . longname ] = true ; } ) ; nav += '</ul>' ; } return nav ; }
Create the navigation sidebar.
Create the navigation sidebar .
//<h2><a href="index.html">Index</a></h2>',
