https://github.com/the-best-codes/bc-bibleverse
Repository for my JS library for getting random Bible verses
https://github.com/the-best-codes/bc-bibleverse
bible christianity religion
Last synced: 5 months ago
JSON representation
Repository for my JS library for getting random Bible verses
- Host: GitHub
- URL: https://github.com/the-best-codes/bc-bibleverse
- Owner: The-Best-Codes
- Created: 2024-01-03T20:39:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-25T14:49:32.000Z (9 months ago)
- Last Synced: 2024-07-25T17:04:09.529Z (9 months ago)
- Topics: bible, christianity, religion
- Language: JavaScript
- Homepage: https://github.com/The-Best-Codes/best-bible
- Size: 342 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WARNING! This project has been sunsetted. Use the new npm package here instead (browser support coming soon): [https://github.com/The-Best-Codes/best-bible](https://github.com/The-Best-Codes/best-bible)
# bc-BibleVerse.js
### A simple random Bible verse picker. It uses JavaScript and an array of Bible verses to choose a random verse out of the Bible.
The JavaScript libarary has only one function; it is very lightweight and shouldn't bog your website down at all.
![]()
## Usage
### getRandomVerse()
The `getRandomVerse()` function has four parameters, three of which are booleans and one of which is a string. Below is a description of how to use each parameter.
#### showKey
>**Default Value:** `true`
>
>**Type:** Boolean
>
>**Options:** `true, false`Determines whether or not the verse will be returned with its key (e.g., Genesis 1:1). Example:
>`true`:
>
>`Genesis 1:1: In the beginning God created the heaven and the earth.`
>
>`false`:
>
>`In the beginning God created the heaven and the earth.`#### showVerse
>**Default Value:** `true`
>
>**Type:** Boolean
>
>**Options:** `true, false`Determines whether the verse text will be included in the return value.
Example:
>`true`:
>
>`Genesis 1:1: In the beginning God created the heaven and the earth.`
>
>`false`:
>
>`Genesis 1:1`#### separationCharacter
>**Default Value:** `': '`
>
>**Type:** String
>
>**Options:** Any string characterSpecifies the character used to separate the verse key from the verse text. This can be changed to accommodate verses that contain colons or for stylistic preferences.
Example:
>Default `': '`:
>
>`Genesis 1:1: In the beginning God created the heaven and the earth.`
>
>Custom `' - '`:
>
>`Genesis 1:1 - In the beginning God created the heaven and the earth.`#### keyAfterText
>**Default Value:** `false`
>
>**Type:** Boolean
>
>**Options:** `true, false`Determines the position of the verse key in relation to the verse text.
Example:
>`true`:
>
>`In the beginning God created the heaven and the earth. Genesis 1:1.`
>(Assumes that `separationCharacter` is set to ' - '.)
>
>`false`:
>
>`Genesis 1:1: In the beginning God created the heaven and the earth.`## Other
The list of verses currently only contains a few good ones. You can fork this repository and add your own to the list (JSON format for JS array), or make an issue and submit your favorite verse so I can add it.
All verses were taken from the KJV.© 2023 - 2043 by [Best_codes](https://the-best-codes.github.io/?github_bible_repo).
![]()