npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@glowstudent/youversion

v2.1.0

Published

A simple module to get the Verse of the Day and any verse you would like.

Downloads

264

Readme

YouVersion-API

A simple module to get the Verse of the Day and any verse you would like.

Installation

Note I use pnpm in these examples. NPM will also work if you don't have or want to install pnpm

First step is of course installing the module

pnpm install @glowstudent/youversion

Usage

Import the library

const YouVersion = require("@glowstudent/youversion");

Getting the verse of the day:

Note The default language is English

const YouVersion = require("@glowstudent/youversion");

(async () => {
  console.log(await YouVersion.getVerseOfTheDay());
})();
{
  "citation": "Hebrews 11:1 (NIV)",
  "passage": "Now faith is confidence in what we hope for and assurance about what we do not see."
}

Getting the verse of the day in a different language:

You can specify a single or multiple languages by passing them as a string separated by a comma. The languages must be in the format of the ISO 639-1 code. For example, en for English, es for Spanish, fr for French, and de for German. It will return the first language that is available. If the language is not available it will move on to the next language in the list.

Single language:

const YouVersion = require("@glowstudent/youversion");

(async () => {
  console.log(await YouVersion.getVerseOfTheDay("sk"));
})();

Multiple languages:

const YouVersion = require("@glowstudent/youversion");

(async () => {
  console.log(await YouVersion.getVerseOfTheDay("es, fr, de"));
})();

Getting any verse:

const YouVersion = require("@glowstudent/youversion");

(async () => {
  console.log(await YouVersion.getVerse("John", "3", "16", "KJV"));
})();
{
  "citation": "John 3:16 KJV",
  "passage": "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."
}

Responses

Requests return a JSON object and a status code.

Good Respsonses

Good responses will return a JSON with a citation and a passage.

{
  "citation": "John 3:16 NLT",
  "passage": "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."
}

Bad Responses

If book is not specified or cannot be read it will return an error.

{
  "code": 400,
  "message": "Missing field 'book'"
}

Trying to access a book that does not exist will prompt a similar response but with a different error message

{
  "code": 400,
  "message": "Could not find book 'Coffee' by name or alias."
}

Books and Aliases

| Book | Alias | | ----------------- | ----- | | Genesis | GEN | | Exodus | EXO | | Leviticus | LEV | | Numbers | NUM | | Deuteronomy | DEU | | Joshua | JOS | | Judges | JDG | | Ruth | RUT | | 1st Samuel | 1SA | | 2nd Samuel | 2SA | | 1st Kings | 1KI | | 2nd Kings | 2KI | | 1st Chronicles | 1CH | | 2nd Chronicles | 2CH | | Ezra | EZR | | Nehemiah | NEH | | Esther | EST | | Job | JOB | | Psalms | PSA | | Proverbs | PRO | | Ecclesiastes | ECC | | Song of Songs | SNG | | Isaiah | ISA | | Jeremiah | JER | | Lamentations | LAM | | Ezekiel | EZK | | Daniel | DAN | | Hosea | HOS | | Joel | JOL | | Amos | AMO | | Obadiah | OBA | | Jonah | JON | | Micah | MIC | | Nahum | NAM | | Habakkuk | HAB | | Zephaniah | ZEP | | Haggai | HAG | | Zechariah | ZEC | | Malachi | MAL | | Matthew | MAT | | Mark | MRK | | Luke | LUK | | John | JHN | | Acts | ACT | | Romans | ROM | | 1st Corinthians | 1CO | | 2nd Corinthians | 2CO | | Galatians | GAL | | Ephesians | EPH | | Philippians | PHP | | Colossians | COL | | 1st Thessalonians | 1TH | | 2nd Thessalonians | 2TH | | 1st Timothy | 1TI | | 2nd Timothy | 2TI | | Titus | TIT | | Philemon | PHM | | Hebrews | HEB | | James | JAS | | 1st Peter | 1PE | | 2nd Peter | 2PE | | 1st John | 1JN | | 2nd John | 2JN | | 3rd John | 3JN | | Jude | JUD | | Revelation | REV |

Versions

| Versions | ID | | -------- | ---- | | AMP | 1588 | | ICL00D | 1196 | | KJV | 1 | | NIV | 111 | | NLT | 116 | | NR06 | 122 | | SCH2000 | 157 | | VULG | 823 | | THSV11 | 174 | | TNCV | 179 | | THAERV | 203 | | NODTHNT | 1907 | | NTV | 2744 | | ESV | 59 | | SBLG | 156 | | CCB | 36 |

Links

Contributing

Before creating an issue, please ensure that it hasn't already been reported/suggested.

License

This project is licensed under the terms of the MIT license.