Skip to content

Commit

Permalink
doc: use module names in stability overview table
Browse files Browse the repository at this point in the history
PR-URL: #45312
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Daeyeon Jeong <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
panva authored Nov 6, 2022
1 parent 9ae8920 commit 4a258b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/doc/stability.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,23 @@ function collectStability(data) {

stability.push({
api: mod.name,
displayName: mod.textRaw,
link: link,
stability: mod.stability,
stabilityText: `(${mod.stability}) ${mod.stabilityText}`,
});
}
}

stability.sort((a, b) => a.api.localeCompare(b.api));
stability.sort((a, b) => a.displayName.localeCompare(b.displayName));
return stability;
}

function createMarkdownTable(data) {
const md = ['| API | Stability |', '| --- | --------- |'];

for (const mod of data) {
md.push(`| [${mod.api}](${mod.link}) | ${mod.stabilityText} |`);
md.push(`| [${mod.displayName}](${mod.link}) | ${mod.stabilityText} |`);
}

return md.join('\n');
Expand Down

0 comments on commit 4a258b2

Please sign in to comment.