This library provides methods to parse bible references. It supports various formats, including simple references like John 3:16
and more complex combinations like Rom 3:23;6:23;5:8;10:9-10,13 KJV
.
To install bible-passage-parser
, use:
npm i bible-passage-parser
Accepts a string input representing a Bible passage and returns the formatted passage with verse content.
query(input: string): {
book_index: number;
book_name: string;
reference: string;
translation: string;
content: ...
}[]
Allows you to set the default translation for queried verses. Only KJV embedded by default.
set_default_translation(
translation_code: string
): void
Allows you to add your own bible translation
add_bible_translation(
translation_code: string,
chapters: {
book: string;
chapterNumber: number;
content: (
[verseNumber: number, verseContent: string] |
[nonVerseTag: string, content: string]
)[];
}[],
bookList?: string[]
): void
Allows you to set your own book interpreter for use with non-english bibles.
set_fuzzy_search_book_list(
fuzzy_book_list: string[][],
): void