(a: T, b: T)
| 15 | } |
| 16 | |
| 17 | export function byDateDesc<T extends { date: string }>(a: T, b: T) { |
| 18 | return new Date(b.date).getTime() - new Date(a.date).getTime() |
| 19 | } |
| 20 | |
| 21 | export function stripMdxExtension(file: string) { |
| 22 | return file.replace(/\.mdx?$/i, '') |