Skip to content

Commit

Permalink
Add deprecation warnings to parseVerse function and cleanVerse pa…
Browse files Browse the repository at this point in the history
…rameter
  • Loading branch information
The-Best-Codes committed Sep 9, 2024
1 parent 1c99579 commit 1f0fafe
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.5.8",
"version": "1.5.9",
"description": "Fetch, parse, and analyze the Bible easily with JavaScript",
"scripts": {
"build:cjs": "tsc --project tsconfig.cjs.json || true && mkdir -p dist/cjs/data && cp src/data/bible.json dist/cjs/data/",
Expand Down
13 changes: 13 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const {
* @param {string} verse - The verse string to parse.
* @param {string} [outputType="default"] - The type of output. Can be "default", "string", or "indexed".
* @return {Array|String} The parsed verse based on the output type.
* @deprecated The bible.json file no longer has translation markers, so this function is not needed.
*/
function parseVerse(verse: string, outputType: string = "default") {
/* @deprecated: The bible.json file will resolve these errors itself. */
Expand Down Expand Up @@ -66,6 +67,9 @@ function getVerse(
chapterNumber: number,
verseNumber: number,
outputType: string = "default",
/**
* @deprecated Use of `cleanVerse` will be removed in a future version. Verses are now always cleaned by default.
*/
cleanVerse: boolean = true
) {
if (!isValidVerse(bookName, chapterNumber, verseNumber)) {
Expand Down Expand Up @@ -106,6 +110,9 @@ function getChapter(
bookName: string,
chapterNumber: number,
outputType: string = "default",
/**
* @deprecated Use of `cleanVerse` will be removed in a future version. Verses are now always cleaned by default.
*/
cleanVerse: boolean = true
) {
if (!isValidChapter(bookName, chapterNumber)) {
Expand Down Expand Up @@ -145,6 +152,9 @@ function getChapter(
function getBook(
bookName: string,
outputType: string = "default",
/**
* @deprecated Use of `cleanVerse` will be removed in a future version. Verses are now always cleaned by default.
*/
cleanVerse: boolean = true
) {
if (!isValidBook(bookName)) {
Expand Down Expand Up @@ -239,6 +249,9 @@ function getRange(
endChapterNumber: number,
endVerseNumber: number,
outputType: string = "default",
/**
* @deprecated Use of `cleanVerse` will be removed in a future version. Verses are now always cleaned by default.
*/
cleanVerse: boolean = true
) {
if (
Expand Down

0 comments on commit 1f0fafe

Please sign in to comment.