Skip to content

Commit

Permalink
update README.md, package.json and src/index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Best-Codes committed Jul 22, 2024
1 parent d19e63b commit 8145b9d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,22 @@ Best Bible also provides utility functions for querying Bible metadata:
- `getBibleBooks()`: Retrieves an array of all the books in the Bible.
- `resolveAbbreviation(abbreviation)`: Resolves a book abbreviation to its full name.

### Validation Utility Functions

Best Bible also provides utility functions for validating Bible data such as verse, chapter, and book names or indices.

To use these functions, you need to import the `bibleValidation` function group:

```javascript
const { bibleValidation } = require("best-bible");
```

The `bibleValidation` function group provides these functions:

- `isValidVerse(bookName, chapterNumber, verseNumber)`: returns true if the verse exists in the Bible.
- `isValidChapter(bookName, chapterNumber)`: returns true if the chapter exists in the Bible.
- `isValidBook(bookName)`: returns true if the book exists in the Bible.

### Example Usage

```javascript
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "best-bible",
"version": "1.0.8",
"version": "1.0.9",
"description": "Fetch, parse, and analyze the Bible easily with JavaScript",
"scripts": {
"test": "node -r esm test/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ module.exports = {
getVerseCount,
getBibleBooks,
resolveAbbreviation,
validation: {
bibleValidation: {
...validators()
}
};

0 comments on commit 8145b9d

Please sign in to comment.