Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bible-reference-range

Package Overview
Dependencies
Maintainers
15
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bible-reference-range

[![CI Status](https://github.com/unfoldingWord/bible-reference-range/workflows/CI/badge.svg)](https://github.com/unfoldingWord/bible-reference-range/actions) [![Current Verison](https://img.shields.io/github/tag/unfoldingWord/bible-reference-range.svg)](h

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
15
Created
Source

bible-reference-range

CI Status Current Verison View this project on NPM Coverage Status

A Library for handling bible reference ranges.

API

These are the exposed end-points

  • parseReferenceToList
    • Takes a reference and splits into individual verses or verse spans. Can handle reference in format such as: “2:4-5”, “2:3a”, “2-3b-4a”, “2:7,12”, “7:11-8:2”, "6:15-16;7:2". It returns a list of {chapter, verse}. Or in the case of a verse range it returns {chapter, verse, endChapter, endVerse}.
  • getVerses
    • finds all verses from a bible contained in ref, returning an array of {chapter, verse, verseData}
  • cleanupReference
    • takes a reference and splits into individual verses or verse spans for cleanup. Then recombines the cleaned up references to a string. Primarily it removes extra characters following the verse number (as in the case of 2:4b-5a) to make it easier to iterate through the verses.
  • referenceHelpers
    • contains all the lower level methods to allow external use.
  • doesReferenceContain
    • Takes two references and determines if a reference is contained within another reference.

INSTALL

  • npm users : nmp i
  • yarn users : yarn

USING

  • In your code add import: import { parseReferenceToList, cleanupReference } from 'bible-reference-range';
  • or to use all the exports do: import { referenceHelpers } from 'bible-reference-range';

FAQs

Package last updated on 07 Dec 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc