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

jsdoc-api

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsdoc-api - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

tmp/out/5dwlup62rbes1c1g2cszynl8frd6m99x3nzxrv7rd0h4dtsatt9.js.html

33

lib/jsdoc-api.js
'use strict'
/**
* A programmatic interface for [jsdoc3](https://github.com/jsdoc3/jsdoc) with a few features:
*
* - Sync and async (Promise) interfaces on the two main jsdoc operations ('explain' and 'render documentation').
* - Input (source code) can supplied as a string or set of file names/globs.
* - Optional caching, dramatically speeding up future invocations with the same input.
* - Supports html input
*
* @module jsdoc-api
* @typicalname jsdoc
* @example
* > const jsdoc = require('jsdoc-api')
*
* > jsdoc.explainSync({ source: '/** example doclet *∕ \n var example = true' })
*
* [ { comment: '/** example doclet *∕',
* meta:
* { range: [ 28, 42 ],
* filename: 'nkrf18zlymohia4i29a0zkyt84obt9.js',
* lineno: 2,
* path: '/var/folders/74/tqh7thm11tq72d7sjty9qvdh0000gn/T',
* code:
* { id: 'astnode100000002',
* name: 'example',
* type: 'Literal',
* value: true } },
* description: 'example doclet',
* name: 'example',
* longname: 'example',
* kind: 'member',
* scope: 'global' },
* { kind: 'package',
* longname: 'package:undefined',
* files: [ '/var/folders/74/tqh7thm11tq72d7sjty9qvdh0000gn/T/nkrf18zlymohia4i29a0zkyt84obt9.js' ] } ]
*/

@@ -45,3 +14,3 @@ exports.explainSync = explainSync

/**
* The [cache-point](https://github.com/75lb/cache-point) instance used when `cache: true` is specified on `.explain()`, `.explainSync()` or `.createExplainStream()`.
* The [cache-point](https://github.com/75lb/cache-point) instance used when `cache: true` is specified on `.explain()` or `.explainSync()`.
* @type {external:cache-point}

@@ -48,0 +17,0 @@ */

{
"name": "jsdoc-api",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "2.0.2",
"version": "2.0.3",
"description": "A programmatic interface for jsdoc",

@@ -33,3 +33,3 @@ "repository": "https://github.com/jsdoc2md/jsdoc-api.git",

"rimraf": "^2.5.4",
"test-runner": "~0.2.3"
"test-runner": "~0.2.4"
},

@@ -45,3 +45,3 @@ "dependencies": {

"object-to-spawn-args": "^1.1.0",
"promise.prototype.finally": "^2.0.0",
"promise.prototype.finally": "^2.0.1",
"temp-path": "^1.0.0",

@@ -48,0 +48,0 @@ "then-fs": "^2.0.0",

@@ -11,5 +11,4 @@ [![view on npm](http://img.shields.io/npm/v/jsdoc-api.svg)](https://www.npmjs.org/package/jsdoc-api)

<a name="module_jsdoc-api"></a>
# jsdoc-api
## jsdoc-api
A programmatic interface for [jsdoc3](https://github.com/jsdoc3/jsdoc) with a few features:

@@ -22,29 +21,32 @@

**Example**
## Synopsis
```js
> const jsdoc = require('jsdoc-api')
> jsdoc.explainSync({ source: '/** example doclet *∕ \n var example = true' })
> jsdoc.explainSync({ source: '/** example doclet */ \n var example = true' })
[ { comment: '/** example doclet *∕',
meta:
{ range: [ 28, 42 ],
filename: 'nkrf18zlymohia4i29a0zkyt84obt9.js',
lineno: 2,
path: '/var/folders/74/tqh7thm11tq72d7sjty9qvdh0000gn/T',
code:
{ id: 'astnode100000002',
name: 'example',
type: 'Literal',
value: true } },
description: 'example doclet',
name: 'example',
longname: 'example',
kind: 'member',
scope: 'global' },
{ kind: 'package',
longname: 'package:undefined',
files: [ '/var/folders/74/tqh7thm11tq72d7sjty9qvdh0000gn/T/nkrf18zlymohia4i29a0zkyt84obt9.js' ] } ]
meta:
{ range: [ 28, 42 ],
filename: 'nkrf18zlymohia4i29a0zkyt84obt9.js',
lineno: 2,
path: '/var/folders/74/tqh7thm11tq72d7sjty9qvdh0000gn/T',
code:
{ id: 'astnode100000002',
name: 'example',
type: 'Literal',
value: true } },
description: 'example doclet',
name: 'example',
longname: 'example',
kind: 'member',
scope: 'global' },
{ kind: 'package',
longname: 'package:undefined',
files: [ '/var/folders/74/tqh7thm11tq72d7sjty9qvdh0000gn/T/nkrf18zlymohia4i29a0zkyt84obt9.js' ] } ]
```
# API Reference
* [jsdoc-api](#module_jsdoc-api)

@@ -78,3 +80,3 @@ * _static_

### jsdoc.cache : <code>[cache-point](https://github.com/75lb/cache-point)</code>
The [cache-point](https://github.com/75lb/cache-point) instance used when `cache: true` is specified on `.explain()`, `.explainSync()` or `.createExplainStream()`.
The [cache-point](https://github.com/75lb/cache-point) instance used when `cache: true` is specified on `.explain()` or `.explainSync()`.

@@ -244,5 +246,4 @@ **Kind**: static property of <code>[jsdoc-api](#module_jsdoc-api)</code>

* * *
&copy; 2015-16 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).

@@ -30,2 +30,7 @@ 'use strict'

runner.test('.explainSync({ source }), defaults', function () {
var output = jsdoc.explainSync({ source: '/** example doclet */ \n var example = true' })
a.strictEqual(output[0].description, 'example doclet')
})
runner.test('.explainSync: no valid files', function () {

@@ -32,0 +37,0 @@ a.throws(

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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