Skip to content

Commit 1d51ff3

Browse files
committed
remove sortBy option
1 parent 2c2c26e commit 1d51ff3

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

es5/jsdoc-parse.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@ var transform = require('./transform');
44

55
module.exports = jsdocParse;
66

7-
function jsdocParse(jsdocData, options) {
8-
options = options || {};
7+
function jsdocParse(jsdocData) {
98
var data = transform(jsdocData);
10-
11-
data = sort(data, options['sort-by']);
12-
return data;
9+
return sort(data);
1310
}
1411

1512
function sort(array, properties) {

lib/jsdoc-parse.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,12 @@ module.exports = jsdocParse
1010

1111
/**
1212
* @param {object[]} - jsdoc output
13-
* @param [options] {object}
14-
* @param [options.sortBy] {string|string[]} - Sort by one of more properties, e.g. `[ 'kind', 'category' ]`. Defaults to `[ 'scope', 'category', 'kind', 'order' ]`.
1513
* @returns {object[]}
1614
* @alias module:jsdoc-parse
1715
*/
18-
function jsdocParse (jsdocData, options) {
19-
options = options || {}
16+
function jsdocParse (jsdocData) {
2017
let data = transform(jsdocData)
21-
22-
/* sort */
23-
data = sort(data, options.sortBy)
24-
return data
18+
return sort(data)
2519
}
2620

2721
function sort (array, properties) {

lib/transform.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ function setCodename (doclet) {
103103
return doclet
104104
}
105105

106-
/**
107-
*/
108106
function setIsExportedFlag (doclet) {
109107
if (/module:/.test(doclet.name) && doclet.kind !== 'module' && doclet.kind !== 'constructor') {
110108
doclet.isExported = true
@@ -164,7 +162,8 @@ function insertConstructors (data) {
164162
return data
165163
}
166164

167-
/* unfortunately the jsdoc data structure differs between es5 and es6 classes, hence the need for these four functions */
165+
/* unfortunately the jsdoc data structure differs between es5 and es6 classes,
166+
hence the need for these four functions */
168167
function getEs6Constructor (data, parent) {
169168
return data.find(i => isES6Constructor(i) && i.memberof === parent.longname)
170169
}
@@ -189,7 +188,6 @@ function isES6Constructor (doclet) {
189188

190189
function replaceID (id, oldID, newID) {
191190
/* this is required by command-line-args which has similar class names like Definition and Definitions */
192-
// return id.replace(new RegExp(`\b${oldID}\b`), newID)
193191
return id.replace(new RegExp(`${oldID}`), newID)
194192
}
195193

0 commit comments

Comments
 (0)