10: sort on stackname (#13)
This commit is contained in:
@@ -108,6 +108,12 @@ module.exports = {
|
|||||||
tto.line('-');
|
tto.line('-');
|
||||||
tto.pushrow(['| status', 'stack', 'branch', 'time since update', 'url'])
|
tto.pushrow(['| status', 'stack', 'branch', 'time since update', 'url'])
|
||||||
.line('-');
|
.line('-');
|
||||||
|
// Sort on stackname
|
||||||
|
curratedStacks.sort((a, b) => {
|
||||||
|
if (a.name < b.name) return -1;
|
||||||
|
if (a.name > b.name) return 1;
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
for (const stack of curratedStacks) {
|
for (const stack of curratedStacks) {
|
||||||
const t = new Date(stack.updated);
|
const t = new Date(stack.updated);
|
||||||
tto.pushrow([status(stack.status), stack.name, ellipsis(stack.branch, 24), timeSince(t.getTime()), stackUrl(stack.name)]);
|
tto.pushrow([status(stack.status), stack.name, ellipsis(stack.branch, 24), timeSince(t.getTime()), stackUrl(stack.name)]);
|
||||||
|
|||||||
Reference in New Issue
Block a user