switched to NKJV, improved grading, improved styling

This commit is contained in:
George Powell
2025-12-23 17:33:33 -05:00
parent 93acafc232
commit f9f0928278
16 changed files with 34345 additions and 68 deletions

View File

@@ -1,10 +1,26 @@
import type { BibleBook, Testament, BibleSection } from '$lib/types/bible';
import { bibleBooks } from '$lib/types/bible';
// Book number (1-66) to book ID mapping derived from bibleBooks order property
export const bookNumberToId: Record<number, string> = bibleBooks.reduce((acc, book) => {
acc[book.order] = book.id;
return acc;
}, {} as Record<number, string>);
// Book ID to book number mapping (reverse lookup)
export const bookIdToNumber: Record<string, number> = bibleBooks.reduce((acc, book) => {
acc[book.id] = book.order;
return acc;
}, {} as Record<string, number>);
export function getBookById(id: string): BibleBook | undefined {
return bibleBooks.find((book) => book.id === id);
}
export function getBookByNumber(number: number): BibleBook | undefined {
return bibleBooks.find((book) => book.order === number);
}
export function getBooksByTestament(testament: Testament): BibleBook[] {
return bibleBooks.filter((book) => book.testament === testament);
}