Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
doc: use module names in stability overview table
PR-URL: #45312
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
panva authored and danielleadams committed Jan 3, 2023
1 parent 28b937a commit d2fc2aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/doc/stability.mjs
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 d2fc2aa

Please sign in to comment.