Skip to content

Commit 6053cc0

Browse files
committed
es5 fixes
1 parent 9aa969d commit 6053cc0

4 files changed

Lines changed: 4 additions & 8 deletions

File tree

bin/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if (options.help) {
2121
process.exit(0)
2222
}
2323

24-
const parseStream = parse(options)
24+
var parseStream = parse(options)
2525
.on('error', function (err) {
2626
stop(err.stack, 1)
2727
})

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ var detect = require('feature-detect-es6')
33
if (detect.all('class', 'arrowFunction', 'let', 'const', 'newArrayFeatures')) {
44
module.exports = require('./lib/jsdoc-parse')
55
} else {
6+
require('core-js/es6/object')
67
module.exports = require('./es5/jsdoc-parse')
78
}

lib/jsdoc-parse.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,12 @@ function jsdocParse (options) {
4949

5050
const explainStream = jsdoc
5151
.createExplainStream(jsdocOptions)
52-
.once('error', emitError)
5352

5453
const transformedStream = transform()
55-
.once('error', emitError)
5654

5755
const outputStream = collectJson(function (data) {
5856
return applyOptions(data, options)
59-
}).once('error', emitError)
60-
61-
function emitError (err) {
62-
outputStream.emit('error', err)
63-
}
57+
})
6458

6559
return connect(explainStream, connect(transformedStream, outputStream))
6660
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"array-tools": "^2",
3030
"collect-json": "^1.0.1",
3131
"command-line-args": "^2.1.1",
32+
"core-js": "^2.0.0",
3233
"feature-detect-es6": "^1.2.0",
3334
"file-set": "~0.2.1",
3435
"jsdoc-api": "~0.2.0",

0 commit comments

Comments
 (0)