Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

chapter-and-verse

Package Overview
Dependencies
1
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.2 to 3.0.3

.idea/runConfigurations/chapter_and_verse.xml

165

js/cv.spec.js

@@ -9,2 +9,21 @@ const chai = require('chai')

const FIRST = {
BOOK: 'gen',
CHAPTER: 'gen 1',
VERSE: 'gen 1:1',
VERSES: 'gen 1:1-4'
}
const LAST = {
BOOK: 'rev',
CHAPTER: 'rev 22',
VERSE: 'rev 22:21',
VERSES: 'rev 22:18-21'
}
const SUMS = {
BOOK: 66,
CHAPTER: 1189,
VERSE: 31103,
VERSES: 31100
}
let cv

@@ -239,2 +258,104 @@

describe('next', () => {
it('book', () => {
let bookCount = 0
cv = chapterAndVerse(FIRST.BOOK)
while (cv.success) {
bookCount++
cv = cv.next()
}
expect(bookCount).to.equal(SUMS.BOOK)
})
it('chapter', () => {
let chapterCount = 0
cv = chapterAndVerse(FIRST.CHAPTER)
while (cv.success) {
chapterCount++
cv = cv.next()
}
expect(chapterCount).to.equal(SUMS.CHAPTER)
})
it('verse', () => {
let verseCount = 0
cv = chapterAndVerse(FIRST.VERSE)
while (cv.success) {
verseCount++
cv = cv.next()
}
expect(verseCount).to.equal(SUMS.VERSE)
})
it('multiple verses', () => {
let verseCount = 0
cv = chapterAndVerse(FIRST.VERSES)
while (cv.success) {
verseCount++
cv = cv.next()
}
expect(verseCount).to.equal(SUMS.VERSES)
})
it('reversal', () => {
cv = chapterAndVerse(FIRST.VERSE)
const cvReversal = cv.next().prev()
delete cv.reason
delete cvReversal.reason
expect(cv).to.eql(cvReversal)
})
})
describe('prev', () => {
it('book', () => {
let bookCount = 0
cv = chapterAndVerse(LAST.BOOK)
while (cv.success) {
bookCount++
cv = cv.prev()
}
expect(bookCount).to.equal(SUMS.BOOK)
})
it('chapter', () => {
let chapterCount = 0
cv = chapterAndVerse(LAST.CHAPTER)
while (cv.success) {
chapterCount++
cv = cv.prev()
}
expect(chapterCount).to.equal(SUMS.CHAPTER)
})
it('verse', () => {
let verseCount = 0
cv = chapterAndVerse(LAST.VERSE)
while (cv.success) {
verseCount++
cv = cv.prev()
}
expect(verseCount).to.equal(SUMS.VERSE)
})
it('multiple verses', () => {
let verseCount = 0
cv = chapterAndVerse(LAST.VERSES)
while (cv.success) {
verseCount++
cv = cv.prev()
}
expect(verseCount).to.equal(SUMS.VERSES)
})
it('reversal', () => {
cv = chapterAndVerse(LAST.VERSE)
const cvReversal = cv.prev().next()
delete cv.reason
delete cvReversal.reason
expect(cv).to.eql(cvReversal)
})
})
describe('failure', () => {

@@ -257,2 +378,32 @@

it('returns failure where next book does not exist', () => {
cv = chapterAndVerse(LAST.BOOK)
expect(cv.next()).to.equal(errors.nextBook)
})
it('returns failure where next chapter does not exist', () => {
cv = chapterAndVerse(LAST.CHAPTER)
expect(cv.next()).to.equal(errors.nextChapter)
})
it('returns failure where next verse does not exist', () => {
cv = chapterAndVerse(LAST.VERSE)
expect(cv.next()).to.equal(errors.nextVerse)
})
it('returns failure where previous book does not exist', () => {
cv = chapterAndVerse(FIRST.BOOK)
expect(cv.prev()).to.equal(errors.prevBook)
})
it('returns failure where previous chapter does not exist', () => {
cv = chapterAndVerse(FIRST.CHAPTER)
expect(cv.prev()).to.equal(errors.prevChapter)
})
it('returns failure where previous verse does not exist', () => {
cv = chapterAndVerse(FIRST.VERSE)
expect(cv.prev()).to.equal(errors.prevVerse)
})
it('throws when toString is called', () => {

@@ -285,2 +436,16 @@ cv = chapterAndVerse(9)

})
it('throws when next is called', () => {
cv = chapterAndVerse(9)
expect(() => {
cv.next()
}).to.throw(/next.+the reference is not a string/)
})
it('throws when prev is called', () => {
cv = chapterAndVerse(9)
expect(() => {
cv.prev()
}).to.throw(/prev.+the reference is not a string/)
})
})

@@ -287,0 +452,0 @@

18

js/errors.js

@@ -27,2 +27,10 @@ function Failure(reason) {

Failure.prototype.next = function() {
thrower.call(this, 'next')
}
Failure.prototype.prev = function() {
thrower.call(this, 'prev')
}
const errors = {

@@ -35,5 +43,13 @@ book: new Failure('book does not exist'),

format: new Failure('the reference format is unrecognised'),
type: new Failure('the reference is not a string')
type: new Failure('the reference is not a string'),
nextBook: new Failure('next book does not exist'),
nextChapter: new Failure('next chapter does not exist'),
nextVerse: new Failure('next verse does not exist'),
prevBook: new Failure('previous book does not exist'),
prevChapter: new Failure('previous chapter does not exist'),
prevVerse: new Failure('previous verse does not exist')
}
module.exports = errors

@@ -5,2 +5,4 @@ const _ = require('lodash')

const errors = require('./errors')
const getChapter = require('./getChapter')
const getVerses = require('./getVerses')

@@ -66,2 +68,102 @@ function CV(book, reason) {

CV.prototype.next = function() {
const NEXT = {
BOOK: 'next book',
CHAPTER: 'next chapter',
VERSE: 'next verse'
}
let cv
const nextBook = _.find(osis, {order: this.book.order + 1})
if (this.getType() === 'book') {
return (nextBook) ? new CV(nextBook, NEXT.BOOK) : errors.nextBook
}
if (this.getType() === 'chapter') {
// current book, next chapter
cv = new CV(this.book, NEXT.CHAPTER)
cv = getChapter(cv, this.chapter + 1)
if (!cv.success) {
if (!nextBook) return errors.nextChapter
// next book, 1st chapter
cv = new CV(nextBook, NEXT.CHAPTER)
cv = getChapter(cv, 1)
}
}
if (this.getType() === 'verse' || this.getType() === 'verses') {
// current book, current chapter, next verse
cv = new CV(this.book, NEXT.VERSE)
cv = getChapter(cv, this.chapter)
cv = getVerses(cv, this.to + 1)
if (!cv.success) {
// current book, next chapter, 1st verse
cv = new CV(this.book, NEXT.VERSE)
cv = getChapter(cv, this.chapter + 1)
if (cv.success) {
cv = getVerses(cv, 1)
} else {
if (!nextBook) return errors.nextVerse
// next book, 1st chapter, 1st verse
cv = new CV(nextBook, NEXT.VERSE)
cv = getChapter(cv, 1)
cv = getVerses(cv, 1)
}
}
}
return cv
}
CV.prototype.prev = function() {
const PREV = {
BOOK: 'previous book',
CHAPTER: 'previous chapter',
VERSE: 'previous verse'
}
let cv
const prevBook = _.find(osis, {order: this.book.order - 1})
if (this.getType() === 'book') {
return (prevBook) ? new CV(prevBook, PREV.BOOK) : errors.prevBook
}
if (this.getType() === 'chapter') {
// current book, previous chapter
cv = new CV(this.book, PREV.CHAPTER)
cv = getChapter(cv, this.chapter - 1)
if (!cv.success) {
if (!prevBook) return errors.prevChapter
// previous book, last chapter
cv = new CV(prevBook, PREV.CHAPTER)
cv = getChapter(cv, cv.book.chapters)
}
}
if (this.getType() === 'verse' || this.getType() === 'verses') {
// current book, current chapter, previous verse
cv = new CV(this.book, PREV.VERSE)
cv = getChapter(cv, this.chapter)
cv = getVerses(cv, this.from - 1)
if (!cv.success) {
// current book, previous chapter, last verse
cv = new CV(this.book, PREV.VERSE)
cv = getChapter(cv, this.chapter - 1)
if (cv.success) {
cv = getVerses(cv, cv.book.versesPerChapter[cv.chapter - 1])
} else {
if (!prevBook) return errors.prevVerse
// previous book, last chapter, last verse
cv = new CV(prevBook, PREV.VERSE)
cv = getChapter(cv, cv.book.chapters)
cv = getVerses(cv, cv.book.versesPerChapter[cv.chapter - 1])
}
}
}
return cv
}
const getBook = strBook => {

@@ -68,0 +170,0 @@

const errors = require('./errors')
const getVerses = (cv, strVerses) => {
if (typeof strVerses === 'number') strVerses = strVerses.toString()
const parts = strVerses.split('-')

@@ -5,0 +6,0 @@ let from = parseInt(parts[0])

132

js/osis.json
[
{"id": "Gen", "name": "Genesis", "testament": "O", "start": "gen", "abbr": ["ge", "gn"], "chapters": 50},
{"id": "Exod", "name": "Exodus", "testament": "O", "start": "exo", "abbr": ["ex"], "chapters": 40},
{"id": "Lev", "name": "Leviticus", "testament": "O", "start": "lev", "abbr": ["le", "lv"], "chapters": 27},
{"id": "Num", "name": "Numbers", "testament": "O", "start": "num", "abbr": ["nu", "nm", "nb"], "chapters": 36},
{"id": "Deut", "name": "Deuteronomy", "testament": "O", "start": "deu", "abbr": ["de", "dt"], "chapters": 34},
{"id": "Josh", "name": "Joshua", "testament": "O", "start": "jos", "abbr": ["jsh"], "chapters": 24},
{"id": "Judg", "name": "Judges", "testament": "O", "start": "judg", "abbr": ["jdg", "jg", "jdgs"], "chapters": 21},
{"id": "Ruth", "name": "Ruth", "testament": "O", "start": "rut", "abbr": ["rth", "ru"], "chapters": 4},
{"id": "1Sam", "name": "1 Samuel", "testament": "O", "start": "1sa", "abbr": ["1sm", "1s"], "chapters": 31},
{"id": "2Sam", "name": "2 Samuel", "testament": "O", "start": "2sa", "abbr": ["2sm", "2s"], "chapters": 24},
{"id": "1Kgs", "name": "1 Kings", "testament": "O", "start": "1ki", "abbr": ["1k"], "chapters": 22},
{"id": "2Kgs", "name": "2 Kings", "testament": "O", "start": "2ki", "abbr": ["2k"], "chapters": 25},
{"id": "1Chr", "name": "1 Chronicles", "testament": "O", "start": "1ch", "abbr": [], "chapters": 29},
{"id": "2Chr", "name": "2 Chronicles", "testament": "O", "start": "2ch", "abbr": [], "chapters": 36},
{"id": "Ezra", "name": "Ezra", "testament": "O", "start": "ezr", "abbr": ["ez"], "chapters": 10},
{"id": "Neh", "name": "Nehemiah", "testament": "O", "start": "neh", "abbr": ["ne"], "chapters": 13},
{"id": "Esth", "name": "Esther", "testament": "O", "start": "est", "abbr": ["es"], "chapters": 10},
{"id": "Job", "name": "Job", "testament": "O", "start": "job", "abbr": ["jb"], "chapters": 42},
{"id": "Ps", "name": "Psalms", "testament": "O", "start": "psa", "abbr": ["pslm", "psm", "pss"], "chapters": 150},
{"id": "Prov", "name": "Proverbs", "testament": "O", "start": "pro", "abbr": ["prv", "pr"], "chapters": 31},
{"id": "Eccl", "name": "Ecclesiastes", "testament": "O", "start": "ecc", "abbr": ["ec", "qoh"], "chapters": 12},
{"id": "Song", "name": "Song of Solomon", "testament": "O", "start": "son", "abbr": ["sos", "so", "canticles", "cant"], "chapters": 8},
{"id": "Isa", "name": "Isaiah", "testament": "O", "start": "isa", "abbr": ["is"], "chapters": 66},
{"id": "Jer", "name": "Jeremiah", "testament": "O", "start": "jer", "abbr": ["je", "jr"], "chapters": 52},
{"id": "Lam", "name": "Lamentations", "testament": "O", "start": "lam", "abbr": ["la"], "chapters": 5},
{"id": "Ezek", "name": "Ezekiel", "testament": "O", "start": "eze", "abbr": ["ezk"], "chapters": 48},
{"id": "Dan", "name": "Daniel", "testament": "O", "start": "dan", "abbr": ["da", "dn"], "chapters": 12},
{"id": "Hos", "name": "Hosea", "testament": "O", "start": "hos", "abbr": ["ho"], "chapters": 14},
{"id": "Joel", "name": "Joel", "testament": "O", "start": "joe", "abbr": ["jl"], "chapters": 3},
{"id": "Amos", "name": "Amos", "testament": "O", "start": "amo", "abbr": ["am"], "chapters": 9},
{"id": "Obad", "name": "Obadiah", "testament": "O", "start": "oba", "abbr": ["ob"], "chapters": 1},
{"id": "Jonah", "name": "Jonah", "testament": "O", "start": "jon", "abbr": ["jnh"], "chapters": 4},
{"id": "Mic", "name": "Micah", "testament": "O", "start": "mic", "abbr": ["mc"], "chapters": 7},
{"id": "Nah", "name": "Nahum", "testament": "O", "start": "nah", "abbr": ["na"], "chapters": 3},
{"id": "Hab", "name": "Habakkuk", "testament": "O", "start": "hab", "abbr": ["hb"], "chapters": 3},
{"id": "Zeph", "name": "Zephaniah", "testament": "O", "start": "zep", "abbr": ["zp"], "chapters": 3},
{"id": "Hag", "name": "Haggai", "testament": "O", "start": "hag", "abbr": ["hg"], "chapters": 2},
{"id": "Zech", "name": "Zechariah", "testament": "O", "start": "zec", "abbr": ["zc"], "chapters": 14},
{"id": "Mal", "name": "Malachi", "testament": "O", "start": "mal", "abbr": ["ml"], "chapters": 4},
{"id": "Matt", "name": "Matthew", "testament": "N", "start": "mat", "abbr": ["mt"], "chapters": 28},
{"id": "Mark", "name": "Mark", "testament": "N", "start": "mar", "abbr": ["mrk", "mk", "mr"], "chapters": 16},
{"id": "Luke", "name": "Luke", "testament": "N", "start": "luk", "abbr": ["lk"], "chapters": 24},
{"id": "John", "name": "John", "testament": "N", "start": "joh", "abbr": ["jhn", "jn"], "chapters": 21},
{"id": "Acts", "name": "Acts", "testament": "N", "start": "act", "abbr": ["ac"], "chapters": 28},
{"id": "Rom", "name": "Romans", "testament": "N", "start": "rom", "abbr": ["ro", "rm"], "chapters": 16},
{"id": "1Cor", "name": "1 Corinthians", "testament": "N", "start": "1co", "abbr": [], "chapters": 16},
{"id": "2Cor", "name": "2 Corinthians", "testament": "N", "start": "2co", "abbr": [], "chapters": 13},
{"id": "Gal", "name": "Galatians", "testament": "N", "start": "gal", "abbr": ["ga"], "chapters": 6},
{"id": "Eph", "name": "Ephesians", "testament": "N", "start": "eph", "abbr": [], "chapters": 6},
{"id": "Phil", "name": "Philippians", "testament": "N", "start": "phili", "abbr": ["phil", "php", "pp"], "chapters": 4},
{"id": "Col", "name": "Colossians", "testament": "N", "start": "col", "abbr": ["co"], "chapters": 4},
{"id": "1Thess", "name": "1 Thessalonians", "testament": "N", "start": "1th", "abbr": [], "chapters": 5},
{"id": "2Thess", "name": "2 Thessalonians", "testament": "N", "start": "2th", "abbr": [], "chapters": 3},
{"id": "1Tim", "name": "1 Timothy", "testament": "N", "start": "1ti", "abbr": [], "chapters": 6},
{"id": "2Tim", "name": "2 Timothy", "testament": "N", "start": "2ti", "abbr": [], "chapters": 4},
{"id": "Titus", "name": "Titus", "testament": "N", "start": "tit", "abbr": ["ti"], "chapters": 3},
{"id": "Phlm", "name": "Philemon", "testament": "N", "start": "phile", "abbr": ["phm", "pm"], "chapters": 1},
{"id": "Heb", "name": "Hebrews", "testament": "N", "start": "heb", "abbr": [], "chapters": 13},
{"id": "Jas", "name": "James", "testament": "N", "start": "jam", "abbr": ["jm"], "chapters": 5},
{"id": "1Pet", "name": "1 Peter", "testament": "N", "start": "1pe", "abbr": ["1pt", "1p"], "chapters": 5},
{"id": "2Pet", "name": "2 Peter", "testament": "N", "start": "2pe", "abbr": ["2pt", "2p"], "chapters": 3},
{"id": "1John", "name": "1 John", "testament": "N", "start": "1jo", "abbr": ["1jhn", "1jn", "1j"], "chapters": 5},
{"id": "2John", "name": "2 John", "testament": "N", "start": "2jo", "abbr": ["2jhn", "2jn", "2j"], "chapters": 1},
{"id": "3John", "name": "3 John", "testament": "N", "start": "3jo", "abbr": ["3jhn", "3jn", "3j"], "chapters": 1},
{"id": "Jude", "name": "Jude", "testament": "N", "start": "jude", "abbr": ["jud", "jd"], "chapters": 1},
{"id": "Rev", "name": "Revelation", "testament": "N", "start": "rev", "abbr": ["re"], "chapters": 22}
{"order": 1, "id": "Gen", "name": "Genesis", "testament": "O", "start": "gen", "abbr": ["ge", "gn"], "chapters": 50},
{"order": 2, "id": "Exod", "name": "Exodus", "testament": "O", "start": "exo", "abbr": ["ex"], "chapters": 40},
{"order": 3, "id": "Lev", "name": "Leviticus", "testament": "O", "start": "lev", "abbr": ["le", "lv"], "chapters": 27},
{"order": 4, "id": "Num", "name": "Numbers", "testament": "O", "start": "num", "abbr": ["nu", "nm", "nb"], "chapters": 36},
{"order": 5, "id": "Deut", "name": "Deuteronomy", "testament": "O", "start": "deu", "abbr": ["de", "dt"], "chapters": 34},
{"order": 6, "id": "Josh", "name": "Joshua", "testament": "O", "start": "jos", "abbr": ["jsh"], "chapters": 24},
{"order": 7, "id": "Judg", "name": "Judges", "testament": "O", "start": "judg", "abbr": ["jdg", "jg", "jdgs"], "chapters": 21},
{"order": 8, "id": "Ruth", "name": "Ruth", "testament": "O", "start": "rut", "abbr": ["rth", "ru"], "chapters": 4},
{"order": 9, "id": "1Sam", "name": "1 Samuel", "testament": "O", "start": "1sa", "abbr": ["1sm", "1s"], "chapters": 31},
{"order": 10, "id": "2Sam", "name": "2 Samuel", "testament": "O", "start": "2sa", "abbr": ["2sm", "2s"], "chapters": 24},
{"order": 11, "id": "1Kgs", "name": "1 Kings", "testament": "O", "start": "1ki", "abbr": ["1k"], "chapters": 22},
{"order": 12, "id": "2Kgs", "name": "2 Kings", "testament": "O", "start": "2ki", "abbr": ["2k"], "chapters": 25},
{"order": 13, "id": "1Chr", "name": "1 Chronicles", "testament": "O", "start": "1ch", "abbr": [], "chapters": 29},
{"order": 14, "id": "2Chr", "name": "2 Chronicles", "testament": "O", "start": "2ch", "abbr": [], "chapters": 36},
{"order": 15, "id": "Ezra", "name": "Ezra", "testament": "O", "start": "ezr", "abbr": ["ez"], "chapters": 10},
{"order": 16, "id": "Neh", "name": "Nehemiah", "testament": "O", "start": "neh", "abbr": ["ne"], "chapters": 13},
{"order": 17, "id": "Esth", "name": "Esther", "testament": "O", "start": "est", "abbr": ["es"], "chapters": 10},
{"order": 18, "id": "Job", "name": "Job", "testament": "O", "start": "job", "abbr": ["jb"], "chapters": 42},
{"order": 19, "id": "Ps", "name": "Psalms", "testament": "O", "start": "psa", "abbr": ["pslm", "psm", "pss"], "chapters": 150},
{"order": 20, "id": "Prov", "name": "Proverbs", "testament": "O", "start": "pro", "abbr": ["prv", "pr"], "chapters": 31},
{"order": 21, "id": "Eccl", "name": "Ecclesiastes", "testament": "O", "start": "ecc", "abbr": ["ec", "qoh"], "chapters": 12},
{"order": 22, "id": "Song", "name": "Song of Solomon", "testament": "O", "start": "son", "abbr": ["sos", "so", "canticles", "cant"], "chapters": 8},
{"order": 23, "id": "Isa", "name": "Isaiah", "testament": "O", "start": "isa", "abbr": ["is"], "chapters": 66},
{"order": 24, "id": "Jer", "name": "Jeremiah", "testament": "O", "start": "jer", "abbr": ["je", "jr"], "chapters": 52},
{"order": 25, "id": "Lam", "name": "Lamentations", "testament": "O", "start": "lam", "abbr": ["la"], "chapters": 5},
{"order": 26, "id": "Ezek", "name": "Ezekiel", "testament": "O", "start": "eze", "abbr": ["ezk"], "chapters": 48},
{"order": 27, "id": "Dan", "name": "Daniel", "testament": "O", "start": "dan", "abbr": ["da", "dn"], "chapters": 12},
{"order": 28, "id": "Hos", "name": "Hosea", "testament": "O", "start": "hos", "abbr": ["ho"], "chapters": 14},
{"order": 29, "id": "Joel", "name": "Joel", "testament": "O", "start": "joe", "abbr": ["jl"], "chapters": 3},
{"order": 30, "id": "Amos", "name": "Amos", "testament": "O", "start": "amo", "abbr": ["am"], "chapters": 9},
{"order": 31, "id": "Obad", "name": "Obadiah", "testament": "O", "start": "oba", "abbr": ["ob"], "chapters": 1},
{"order": 32, "id": "Jonah", "name": "Jonah", "testament": "O", "start": "jon", "abbr": ["jnh"], "chapters": 4},
{"order": 33, "id": "Mic", "name": "Micah", "testament": "O", "start": "mic", "abbr": ["mc"], "chapters": 7},
{"order": 34, "id": "Nah", "name": "Nahum", "testament": "O", "start": "nah", "abbr": ["na"], "chapters": 3},
{"order": 35, "id": "Hab", "name": "Habakkuk", "testament": "O", "start": "hab", "abbr": ["hb"], "chapters": 3},
{"order": 36, "id": "Zeph", "name": "Zephaniah", "testament": "O", "start": "zep", "abbr": ["zp"], "chapters": 3},
{"order": 37, "id": "Hag", "name": "Haggai", "testament": "O", "start": "hag", "abbr": ["hg"], "chapters": 2},
{"order": 38, "id": "Zech", "name": "Zechariah", "testament": "O", "start": "zec", "abbr": ["zc"], "chapters": 14},
{"order": 39, "id": "Mal", "name": "Malachi", "testament": "O", "start": "mal", "abbr": ["ml"], "chapters": 4},
{"order": 40, "id": "Matt", "name": "Matthew", "testament": "N", "start": "mat", "abbr": ["mt"], "chapters": 28},
{"order": 41, "id": "Mark", "name": "Mark", "testament": "N", "start": "mar", "abbr": ["mrk", "mk", "mr"], "chapters": 16},
{"order": 42, "id": "Luke", "name": "Luke", "testament": "N", "start": "luk", "abbr": ["lk"], "chapters": 24},
{"order": 43, "id": "John", "name": "John", "testament": "N", "start": "joh", "abbr": ["jhn", "jn"], "chapters": 21},
{"order": 44, "id": "Acts", "name": "Acts", "testament": "N", "start": "act", "abbr": ["ac"], "chapters": 28},
{"order": 45, "id": "Rom", "name": "Romans", "testament": "N", "start": "rom", "abbr": ["ro", "rm"], "chapters": 16},
{"order": 46, "id": "1Cor", "name": "1 Corinthians", "testament": "N", "start": "1co", "abbr": [], "chapters": 16},
{"order": 47, "id": "2Cor", "name": "2 Corinthians", "testament": "N", "start": "2co", "abbr": [], "chapters": 13},
{"order": 48, "id": "Gal", "name": "Galatians", "testament": "N", "start": "gal", "abbr": ["ga"], "chapters": 6},
{"order": 49, "id": "Eph", "name": "Ephesians", "testament": "N", "start": "eph", "abbr": [], "chapters": 6},
{"order": 50, "id": "Phil", "name": "Philippians", "testament": "N", "start": "phili", "abbr": ["phil", "php", "pp"], "chapters": 4},
{"order": 51, "id": "Col", "name": "Colossians", "testament": "N", "start": "col", "abbr": ["co"], "chapters": 4},
{"order": 52, "id": "1Thess", "name": "1 Thessalonians", "testament": "N", "start": "1th", "abbr": [], "chapters": 5},
{"order": 53, "id": "2Thess", "name": "2 Thessalonians", "testament": "N", "start": "2th", "abbr": [], "chapters": 3},
{"order": 54, "id": "1Tim", "name": "1 Timothy", "testament": "N", "start": "1ti", "abbr": [], "chapters": 6},
{"order": 55, "id": "2Tim", "name": "2 Timothy", "testament": "N", "start": "2ti", "abbr": [], "chapters": 4},
{"order": 56, "id": "Titus", "name": "Titus", "testament": "N", "start": "tit", "abbr": ["ti"], "chapters": 3},
{"order": 57, "id": "Phlm", "name": "Philemon", "testament": "N", "start": "phile", "abbr": ["phm", "pm"], "chapters": 1},
{"order": 58, "id": "Heb", "name": "Hebrews", "testament": "N", "start": "heb", "abbr": [], "chapters": 13},
{"order": 59, "id": "Jas", "name": "James", "testament": "N", "start": "jam", "abbr": ["jm"], "chapters": 5},
{"order": 60, "id": "1Pet", "name": "1 Peter", "testament": "N", "start": "1pe", "abbr": ["1pt", "1p"], "chapters": 5},
{"order": 61, "id": "2Pet", "name": "2 Peter", "testament": "N", "start": "2pe", "abbr": ["2pt", "2p"], "chapters": 3},
{"order": 62, "id": "1John", "name": "1 John", "testament": "N", "start": "1jo", "abbr": ["1jhn", "1jn", "1j"], "chapters": 5},
{"order": 63, "id": "2John", "name": "2 John", "testament": "N", "start": "2jo", "abbr": ["2jhn", "2jn", "2j"], "chapters": 1},
{"order": 64, "id": "3John", "name": "3 John", "testament": "N", "start": "3jo", "abbr": ["3jhn", "3jn", "3j"], "chapters": 1},
{"order": 65, "id": "Jude", "name": "Jude", "testament": "N", "start": "jude", "abbr": ["jud", "jd"], "chapters": 1},
{"order": 66, "id": "Rev", "name": "Revelation", "testament": "N", "start": "rev", "abbr": ["re"], "chapters": 22}
]
{
"name": "chapter-and-verse",
"version": "3.0.2",
"version": "3.0.3",
"description": "Given a bible reference, validates it and returns an object with book, chapter, verse and more",

@@ -33,4 +33,4 @@ "author": "danday74",

"mocha": "^5.0.5",
"webpack": "^4.4.1",
"webpack-cli": "^2.0.13"
"webpack": "^4.28.3",
"webpack-cli": "^3.2.0"
},

@@ -37,0 +37,0 @@ "keywords": [

@@ -1,7 +0,19 @@

* Allow for other versification differences - e.g. Romans WEB
* Test end of chapter next() and prev()
* Mode to determine which differences to allow?
* What's first, prev or next?
* Make sure all next changes have a prev change
* Add OSIS verse ref
* Add scrollmapper verse ref - 01001001 - scrollmapper - https://github.com/scrollmapper/bible_databases
* Remove functions?
* Add browser unit tests - Currently cv.spec.js makes testing in the browser difficult
* Add more abbreviations - including II Samuel, II Kings, etc - https://viz.bible/downloads
* Option to determine which differences to allow?
* Allow for other versification differences - e.g. Account for WEB verses in Romans

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc