bible.js
The Bible as a NPM module.
☁️ Installation
# Using npm npm install --save bible.js # Using yarn yarn add bible.js
📋 Example
const Bible = ; // Init BibleBible;
❓ Get Help
There are few ways to get help:
- Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
- For bug reports and feature requests, open issues. 🐛
- For direct and quick help, you can use Codementor. 🚀
📝 Documentation
init(config, cb)
Inits BibleJS submodules by downloading them as set in the config
object
This method should be called before initializing the BibleJS instance.
Params
- Object
config
: The configuration object containing the following field: versions
(Object)<version_name>
(Object)source
(String): The git url of the BibleJS submodule.version
(String): The git tag or branch of the submodule.language
(String): The submodule language.
- Function
cb
: The cb function.
Return
- BibleJS The BibleJS constructor.
BibleJS(options)
Creates a new BibleJS
instance.
Params
- Object
options
: An object containing the following fields: language
: the langauge of the BibleJS instance (default:"en"
).
Return
- BibleJS The
BibleJS
instance.
get(reference, cb)
This function gets the response providing the BibleJS reference
.
Params
- String
reference
: The verse reference. It can be in the following formats:
e.g. Genesis 1:1 - returns one verse
or Genesis 1:1,2 - returns two verses (1 and 2)
or Genesis 1:1-10 - returns the verses 1 - 10
or Genesis 1 - returns the whole chapter
- Function
cb
: The cb function.
Return
- BibleJS The BibleJS instance (this).
search(query, cb)
This function gets the verses that match to the regular expression provided.
Params
- String|RegExp
query
: The string/regular expression that matches the searched verses. - Function
cb
: The cb function
Return
- BibleJS The BibleJS instance (this)
😋 How to contribute
Have an idea? Found a bug? See how to contribute.
💖 Support my projects
I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
-
Starring and sharing the projects you like 🚀
-
—I love books! I will remember you after years if you buy me one. 😁 📖
-
—You can make one-time donations via PayPal. I'll probably buy a
coffeetea. 🍵 -
—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
-
Bitcoin—You can send me bitcoins at this address (or scanning the code below):
1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6
Thanks! ❤️
💫 Where is this library used?
If you are using this library in one of your projects, add it in this list. ✨
bible-sample-config
bible