How to use the jsdoc/util/templateHelper.longnameToUrl function in jsdoc

To help you get started, we’ve selected a few jsdoc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github adobe / coral-spectrum / source / docTemplate / publish.js View on Github external
// add template helpers
    view.find = find;
    view.linkto = linkto;
    view.tutoriallink = tutoriallink;
    view.htmlsafe = htmlsafe;

    // once for all
    view.nav = buildNav(members);

    for (var longname in helper.longnameToUrl) {
        if ( hasOwnProp.call(helper.longnameToUrl, longname) ) {
            // reuse 'members', which speeds things up a bit
            var classes = taffy(members.classes);
            classes = helper.find(classes, {longname: longname});
            if (classes.length) {
                generate('Class: ' + classes[0].name, classes, helper.longnameToUrl[longname]);
            }
    
            var modules = taffy(members.modules);
            modules = helper.find(modules, {longname: longname});
            if (modules.length) {
                generate('Module: ' + modules[0].name, modules, helper.longnameToUrl[longname]);
            }
        
            var namespaces = taffy(members.namespaces);
            namespaces = helper.find(namespaces, {longname: longname});
            if (namespaces.length) {
                generate('Namespace: ' + namespaces[0].name, namespaces, helper.longnameToUrl[longname]);
            }
        
            var mixins = taffy(members.mixins);
            mixins = helper.find(mixins, {longname: longname});
github jsdoc / jsdoc / test / specs / jsdoc / util / templateHelper.js View on Github external
afterEach(() => {
            delete helper.longnameToUrl.MyClass;
        });
github cuthbertLab / music21j / node_modules / grunt-jsdoc / node_modules / jsdoc / templates / default / publish.js View on Github external
data().each(function(doclet) {
        var url = helper.longnameToUrl[doclet.longname];

        if (url.indexOf('#') > -1) {
            doclet.id = helper.longnameToUrl[doclet.longname].split(/#/).pop();
        }
        else {
            doclet.id = doclet.name;
        }

        if ( needsSignature(doclet) ) {
            addSignatureParams(doclet);
            addSignatureReturns(doclet);
            addAttribs(doclet);
        }
    });
github lowlighter / astar / docs / .spotlight / src / publish.js View on Github external
data().each(function(doclet) {
        var url = helper.longnameToUrl[doclet.longname];

        if (url.indexOf('#') > -1) {
            doclet.id = helper.longnameToUrl[doclet.longname].split(/#/).pop();
        }
        else {
            doclet.id = doclet.name;
        }

        if ( needsSignature(doclet) ) {
            addSignatureParams(doclet);
            addSignatureReturns(doclet);
            addAttribs(doclet);
        }
    });
github miguelmota / inview / node_modules / jsdoc-oblivion / template / publish.js View on Github external
data().each( function ( doclet ) {
    var url = helper.longnameToUrl[doclet.longname];

    if ( url.indexOf( '#' ) > -1 ) {
      doclet.id = helper.longnameToUrl[doclet.longname].split( /#/ ).pop();
    }
    else {
      doclet.id = doclet.name;
    }

    if ( needsSignature( doclet ) ) {
      addSignatureParams( doclet );
      addSignatureReturns( doclet );
      addAttribs( doclet );
    }
  } );
github source-academy / js-slang / doc / jsdoc / templates / template / publish.js View on Github external
data().each(doclet => {
        const url = helper.longnameToUrl[doclet.longname];

        if (url.includes('#')) {
            doclet.id = helper.longnameToUrl[doclet.longname].split(/#/).pop();
        }
        else {
            doclet.id = doclet.name;
        }

        if ( needsSignature(doclet) ) {
            addSignatureParams(doclet);
            addSignatureReturns(doclet);
            addAttribs(doclet);
        }
    });
github smltq / jPublic / node_modules / jsdoc / templates / default / publish.js View on Github external
Object.keys(helper.longnameToUrl).forEach(function(longname) {
        var myClasses = helper.find(classes, {longname: longname});
        var myExternals = helper.find(externals, {longname: longname});
        var myInterfaces = helper.find(interfaces, {longname: longname});
        var myMixins = helper.find(mixins, {longname: longname});
        var myModules = helper.find(modules, {longname: longname});
        var myNamespaces = helper.find(namespaces, {longname: longname});

        if (myModules.length) {
            generate('Module: ' + myModules[0].name, myModules, helper.longnameToUrl[longname]);
        }

        if (myClasses.length) {
            generate('Class: ' + myClasses[0].name, myClasses, helper.longnameToUrl[longname]);
        }

        if (myNamespaces.length) {
            generate('Namespace: ' + myNamespaces[0].name, myNamespaces, helper.longnameToUrl[longname]);
        }

        if (myMixins.length) {
            generate('Mixin: ' + myMixins[0].name, myMixins, helper.longnameToUrl[longname]);
        }

        if (myExternals.length) {
            generate('External: ' + myExternals[0].name, myExternals, helper.longnameToUrl[longname]);
github miguelmota / inview / node_modules / jsdoc-oblivion / template / publish.js View on Github external
var classes = taffy( members.classes );
  var modules = taffy( members.modules );
  var namespaces = taffy( members.namespaces );
  var mixins = taffy( members.mixins );
  var externals = taffy( members.externals );

  for ( var longname in helper.longnameToUrl ) {
    if ( hasOwnProp.call( helper.longnameToUrl, longname ) ) {
      var myClasses = helper.find( classes, {longname : longname} );
      if ( myClasses.length ) {
        generate( 'class', 'Class: ' + myClasses[0].name, myClasses, helper.longnameToUrl[longname] );
      }

      var myModules = helper.find( modules, {longname : longname} );
      if ( myModules.length ) {
        generate( 'module', 'Module: ' + myModules[0].name, myModules, helper.longnameToUrl[longname] );
      }

      var myNamespaces = helper.find( namespaces, {longname : longname} );
      if ( myNamespaces.length ) {
        generate( 'namespace', 'Namespace: ' + myNamespaces[0].name, myNamespaces, helper.longnameToUrl[longname] );
      }

      var myMixins = helper.find( mixins, {longname : longname} );
      if ( myMixins.length ) {
        generate( 'mixin', 'Mixin: ' + myMixins[0].name, myMixins, helper.longnameToUrl[longname] );
      }

      var myExternals = helper.find( externals, {longname : longname} );
      if ( myExternals.length ) {
        generate( 'external', 'External: ' + myExternals[0].name, myExternals, helper.longnameToUrl[longname] );
      }
github camptocamp / ngeo / jsdoc / template / publish.js View on Github external
generate('Namespace: ' + myNamespaces[0].name, myNamespaces, helper.longnameToUrl[longname]);
        }

        let myMixins = helper.find(mixins, {longname: longname});
        if (myMixins.length) {
            generate('Mixin: ' + myMixins[0].name, myMixins, helper.longnameToUrl[longname]);
        }

        let myExternals = helper.find(externals, {longname: longname});
        if (myExternals.length) {
            generate('External: ' + myExternals[0].name, myExternals, helper.longnameToUrl[longname]);
        }

        let myInterfaces = helper.find(interfaces, {longname: longname});
        if (myInterfaces.length) {
            generate('Interface: ' + myInterfaces[0].name, myInterfaces, helper.longnameToUrl[longname]);
        }
    });