-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Here's an improved version of the GitHub wiki page for "Getting Started":
Welcome to Best Bible, a comprehensive JavaScript package for accessing and working with biblical content. This guide will help you quickly set up and start using Best Bible in your project.
Best Bible is available on major JavaScript package managers. Choose your preferred method:
npm install best-bible@latest
yarn add best-bible
Best Bible is also available on Socket. For alternative installation methods, please refer to your package manager's documentation.
You can also download the ZIP file directly from our GitHub repository.
Using the browser script is not recommended, as it combines the utils/
, src/
, and data/bible.json
files. This means it is quite large and can slow down your initial page load time dramatically. To help with this, you can wait until after the page has loaded to inject the script, or simply use the npm package with a framework as intended.
If you still want to use the browser package, you can do so by adding the following script
tag to your HTML head or body element:
<script src="https://cdn.jsdelivr.net/npm/best-bible@latest/dist/browser/best-bible.min.js"></script>
Browser usage will be the same as the npm package except by prefixing functions with the BestBible
namespace. See below:
// Example in Node
import { getVerse } from 'best-bible';
const verse = getVerse("John", 3, 16);
console.log(verse);
// Example in browser
// Optionally, if you don't inject the script after page load, wait for the script itself to load before using it
document.addEventListener("DOMContentLoaded", function () {
const verse = BestBible.getVerse('John', 3, 16);
console.log(verse);
});
Thank you for choosing Best Bible. We hope it enhances your biblical studies and projects!
© 2024 by The-Best-Codes