BibleScript is a JavaScript parser for Bible references (written in TypeScript), with additional functionality for comparisons and scripture text retrieval.
BibleScript can:
- Parse text BCV (Book, Chapter, Verse) specifications, in the following formats:
- References
- Genesis
- Genesis 1
- Genesis 1:3
- Ranges
- Genesis 1:3-10
- Genesis 1:3-Exodus 2:4
- References
- Convert verse numbers to/from text BCV specifications
- Retrieve the scripture text of References and Ranges, from GetBible.NET
bower install biblescript -- save
Once installed, the framework can be loaded as a dependency using an AMD loader, such as RequireJS.
An overview of the API is as follows; note that, while access modifiers exist in TypeScript, all members can be directly accessed using JavaScript - hence, the overview below covers only the types which are meant to be accessed directly.
As this is not meant to be exhaustive, it is recommended that you go through the full definition of the API, including JSDoc-annotated documentation, which is available in the BibleScript TypeScript ambient declarations.
The facade of the framework, the Bible
class will typically be what you use first.
This property returns an array of Book
, representing the books of the bible.