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.
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.
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
Default Value:
': '
Type: String
Options: Any string character
Specifies 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.
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 thatseparationCharacter
is set to ' - '.)
false
:
Genesis 1:1: In the beginning God created the heaven and the earth.
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.