Skip to content

Commit c3474c8

Browse files
committed
Sort methods names before sending to renderer.
1 parent 83c8368 commit c3474c8

File tree

1 file changed

+9
-0
lines changed
  • packages/doxdox-parser-jsdoc/src

1 file changed

+9
-0
lines changed

packages/doxdox-parser-jsdoc/src/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ export default async (cwd: string, path: string): Promise<File> => {
6161
returns,
6262
private: jsdoc.access === 'private'
6363
};
64+
})
65+
.sort((a, b) => {
66+
if (a.name.toLocaleLowerCase() < b.name.toLocaleLowerCase()) {
67+
return -1;
68+
}
69+
if (a.name.toLocaleLowerCase() > b.name.toLocaleLowerCase()) {
70+
return 1;
71+
}
72+
return 0;
6473
});
6574

6675
return { path, methods };

0 commit comments

Comments
 (0)