refactor: deduplicates our sorting function

This commit is contained in:
Lewis Wynne 2026-03-27 18:23:24 +00:00
parent 8209d036cd
commit 384ca71f89
3 changed files with 14 additions and 19 deletions

View file

@ -1,7 +1,7 @@
import fs from 'node:fs';
import path from 'node:path';
import yaml from 'js-yaml';
import { sortByPinnedThenDate } from './format';
import { sortEntries } from './format';
export interface TxtFile {
name: string;
@ -44,6 +44,6 @@ export function getTxtFiles(): TxtFile[] {
pinned: pinnedSet.has(name),
description: descriptions[name],
}));
return sortByPinnedThenDate(files);
return sortEntries(files);
}