Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsdoc-api

Package Overview
Dependencies
Maintainers
0
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsdoc-api

A programmatic interface for jsdoc

  • 9.3.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
172K
decreased by-20.44%
Maintainers
0
Weekly downloads
 
Created

What is jsdoc-api?

The jsdoc-api npm package provides a programmatic interface to JSDoc, allowing you to generate documentation from JavaScript source code comments. It can be used to parse JSDoc comments and generate JSON output, making it easier to integrate JSDoc functionality into build processes or other tools.

What are jsdoc-api's main functionalities?

Generate Documentation

This feature allows you to generate documentation from JavaScript files. The `renderSync` method processes the specified files and generates the documentation.

const jsdoc = require('jsdoc-api');

jsdoc.renderSync({
  files: 'path/to/your/file.js'
});

Parse JSDoc Comments

This feature allows you to parse JSDoc comments from a source string. The `explainSync` method returns a JSON representation of the parsed comments.

const jsdoc = require('jsdoc-api');

const docs = jsdoc.explainSync({
  source: '/**
   * A description of the function.
   * @param {string} name - The name of the person.
   * @returns {string} A greeting message.
   */
  function greet(name) {
    return `Hello, ${name}!`;
  }'
});

console.log(docs);

Configure JSDoc Options

This feature allows you to use a configuration file to customize the JSDoc generation process. The `configure` option specifies the path to a JSDoc configuration file.

const jsdoc = require('jsdoc-api');

const docs = jsdoc.explainSync({
  files: 'path/to/your/file.js',
  configure: 'path/to/jsdoc.conf.json'
});

console.log(docs);

Other packages similar to jsdoc-api

Keywords

FAQs

Package last updated on 01 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc