How to use the jsdoc-to-markdown.getJsdocData function in jsdoc-to-markdown

To help you get started, we’ve selected a few jsdoc-to-markdown 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 ZeroNetJS / zeronet-js / tools / docs-gen / lib / index.js View on Github external
if (doc.kind == "class" && doc.scope == "global") part.addClass(doc.name, doc)
          else if (doc.kind == "function" && doc.memberof && !doc.memberof.startsWith("module") && !doc.memberof.startsWith("") && !doc.longname.startsWith("module") && !doc.longname.startsWith("")) part.addMember(doc.longname, doc)
          else log("Unknown", doc.kind, doc.scope, doc.longname)
        })
      })
      log("rendering")
      let res = docs.render(parts)
      if (res.getAll().length < 4) res = rend() //Remove API header if there are no docs or just empty class docs
      res.add(conf.footer || "Docs are autogenerated by a script", true)
      return cb(null, res.toString())
    } catch (e) {
      return cb(e)
    }
  }

  jsdoc2md.getJsdocData({
      files,
      jsdoc: true
    })
    .then(jsdoc => {
      process.nextTick(d, jsdoc)
    })
    .catch(cb)
}

jsdoc-to-markdown

Generates markdown API documentation from jsdoc annotated source code

MIT
Latest version published 23 days ago

Package Health Score

76 / 100
Full package analysis