Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
api.bible-api
Advanced tools
Library to facilitate use of API Bible service. https://scripture.api.bible
Library that provides a typed interface for the Api.Bible web services API.Bible
You must first apply for an account and submit your app to API.Bible. See docs
There are two levels of api provided by this library. The first is the ApiBibleBaseAPI. This is the lowest level and can be used to build your own services. The second, and higher level, api is ApiBibleUtility. It can be used to perform functions such as loading an entire bible and then saving it to disk. Note that this utility class is dependent upon the lower level api.
The verse data returned by the api is in an unparsed, granular, format and must be processed to be human-readable. A default parser (DefaultVerseParser) is provided that produces a format that is suitable for most uses. For example, in the KJV text, words in italics are preserved.
To provide your own parser, subclass the VerseParser class and implement the parse method. Then, provide your verse parser to the constructor of the ApiBibleUtility instance.
Bible : Collection of books.
Book : Collection of chapters and possibly notes and summaries.
Chapter : Collection of verses and notes.
Verse : Text of bible.
Bibles have a string id
const api = new ApiBibleBaseAPI( 'your-api-key' );
const bible = await api.getBible( 'bible-id' );
console.log( bible.name )
const api = new ApiBibleBaseAPI( 'your-api-key' );
const books = await api.getBooks( 'bible-id' );
Verses are returned in an unparsed format and must be constructed.
const api = new ApiBibleBaseAPI( 'your-api-key' );
const verses = await api.getVerses( 'bible-id', 'chapter-id' );
const utility = new ApiBibleUtility( 'your-api-key', 'bible-id' );
await utility.loadEntireBible( 'path-to-file.json' );
With custom parser
const utility = new ApiBibleUtility( 'your-api-key', 'bible-id', new MyParser() );
await utility.loadEntireBible( 'path-to-file.json' );
This parser reduces multiple white spaces to a single space and leaves special words and phrase that were added by the translators intact. For example, in the KJV, words that were added to clarify the text and are usually printed in italics are preserved.
Note that the verse parser can be used with verse data returned by the ApiBibleBaseAPI, without the use of the ApiBibleUtility class. This facilitates implementing your own utility class without having to create your own parser, when the default parser meets your needs.
Verse parsing has some intricacies in how the text is provided by the api. A study of the returned data and an understanding of Bible text is needed to create a custom parser.
FAQs
Library to facilitate use of API Bible service. https://scripture.api.bible
The npm package api.bible-api receives a total of 0 weekly downloads. As such, api.bible-api popularity was classified as not popular.
We found that api.bible-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.