UNPKG

@allemandi/bible-validate

Version:

Fast, type-safe utilities for parsing, validating, and normalizing Bible references.

55 lines 1.2 kB
export type BibleBook = { /** * - The canonical name of the book. */ book: string; /** * - Alternative names or abbreviations for the book. */ aliases: string[]; /** * - Array of verse counts for each chapter. */ chapters: number[]; }; export type ParsedReference = { /** * - The normalized book name */ book: string | null; /** * - The chapter number */ chapter: number | null; /** * - The starting verse number */ verseStart: number | null; /** * - The ending verse number (for ranges) */ verseEnd: number | null; }; export type ParseReferenceOptions = { /** * - Whether to return structured result. */ structured?: boolean | undefined; }; export type SimpleResult = { isValid: boolean; error: string | null; original: string; formatted?: string | undefined; }; export type StructuredResult = { isValid: boolean; book: string; chapter: number; verseStart: number | null; verseEnd: number | null; error: string | null; original: string; formatted?: string | undefined; }; //# sourceMappingURL=types.d.ts.map