Socket
Socket
Sign inDemoInstall

jsdoc-api

Package Overview
Dependencies
Maintainers
1
Versions
54
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 4.0.1 to 4.0.2

index.js

3

lib/explain.js

@@ -16,4 +16,3 @@ 'use strict'

if (err) return Promise.reject(err)
if (this.options.cache) {
if (this.options.cache && !this.options.source) {
return this.readCache().catch(this._runJsdoc.bind(this))

@@ -20,0 +19,0 @@ } else {

{
"name": "jsdoc-api",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "4.0.1",
"version": "4.0.2",
"description": "A programmatic interface for jsdoc",
"repository": "https://github.com/jsdoc2md/jsdoc-api.git",
"license": "MIT",
"main": "lib/jsdoc-api",
"keywords": [

@@ -10,0 +9,0 @@ "jsdoc",

@@ -45,1 +45,24 @@ 'use strict'

})
runner.test('caching: .explain({ source, cache: true }) - Ensure correct output (#147)', function () {
return jsdoc.cache.clear().then(() => {
let one = jsdoc.explain({ source: '/**\n * Function one\n */\nfunction one () {}\n', cache: true })
let two = jsdoc.explain({ source: '/**\n * Function two\n */\nfunction two () {}\n', cache: true })
let three = jsdoc.explain({ source: '/**\n * Function three\n */\nfunction three () {}\n', cache: true })
Promise.all([ one, two, three ]).then(output => {
a.strictEqual(output[0][0].description, 'Function one')
a.strictEqual(output[1][0].description, 'Function two')
a.strictEqual(output[2][0].description, 'Function three')
})
/* ensure it works correctly the second time */
one = jsdoc.explain({ source: '/**\n * Function one\n */\nfunction one () {}\n', cache: true })
two = jsdoc.explain({ source: '/**\n * Function two\n */\nfunction two () {}\n', cache: true })
three = jsdoc.explain({ source: '/**\n * Function three\n */\nfunction three () {}\n', cache: true })
Promise.all([ one, two, three ]).then(output => {
a.strictEqual(output[0][0].description, 'Function one')
a.strictEqual(output[1][0].description, 'Function two')
a.strictEqual(output[2][0].description, 'Function three')
})
})
})

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