codexparser 0.0.81 → 0.0.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codexparser",
3
- "version": "0.0.81",
3
+ "version": "0.0.83",
4
4
  "description": "This is a Javascript Bible parser and text scanner. It will search through texts and collate all scripture references into an array and parse them into objects, and it will parse passages into objects by book, chapter, verse, and testament. ",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -31,4 +31,4 @@
31
31
  "bible-passage-reference-parser": "^2.0.1",
32
32
  "unidecode": "^1.1.0"
33
33
  }
34
- }
34
+ }
@@ -1,13 +1,11 @@
1
+ const versified = require("./versified")
1
2
  const bible = require("./bible")
2
3
  const { bookRegex, chapterRegex, verseRegex, scripturesRegex, EzraAbbrv } = require("./regex")
3
4
  const abbrevations = require("./abbr")
4
- //const toc = require("./toc")
5
5
  const crawler = require("bible-passage-reference-parser/js/en_bcv_parser").bcv_parser
6
6
  const util = require("util")
7
-
8
- const dump = (item) => {
9
- console.log(util.inspect(item, { depth: null, colors: true }))
10
- }
7
+ const dump = require("./functions").dump
8
+ const dd = require("./functions").dd
11
9
 
12
10
  class CodexParser {
13
11
  constructor() {
@@ -22,35 +20,7 @@ class CodexParser {
22
20
  this.EzraAbbrv = EzraAbbrv
23
21
  //this.toc = toc
24
22
  this.crawler = new crawler()
25
- this.preStrings = ["III", "II", "I", "1st", "2nd", "3rd", "First", "Second", "Third", "1", "2", "3"]
26
- this.preStringed = [
27
- "Sam",
28
- "Samuel",
29
- "Kings",
30
- "Kgs",
31
- "Kin",
32
- "Chron",
33
- "Chronicles",
34
- "Corinthians",
35
- "Co",
36
- "Cor",
37
- "Thessalonians",
38
- "Th",
39
- "Thes",
40
- "Thess",
41
- "Timothy",
42
- "Ti",
43
- "Tim",
44
- "Peter",
45
- "Pe",
46
- "Pet",
47
- "Pt",
48
- "John",
49
- "Jn",
50
- "Jhn",
51
- ]
52
-
53
- this.text = String
23
+ this.versificationDifferences = versified
54
24
  }
55
25
 
56
26
  /**
@@ -112,7 +82,6 @@ class CodexParser {
112
82
  * @return {array} An array of parsed passages.
113
83
  */
114
84
  parse(reference) {
115
- //TODO: Need to fix chapter ranges when another verse is tacted onto the end of it.
116
85
  if (!reference) {
117
86
  this.passages = []
118
87
  return this
@@ -136,6 +105,7 @@ class CodexParser {
136
105
  chapter: result.start.c,
137
106
  verses: this.versify(result),
138
107
  type: result.type,
108
+ ...result["entities"][0],
139
109
  }
140
110
  passage.testament = this.bible.old.includes(passage.book) ? "old" : "new"
141
111
  let next = this.found[i + 1]
@@ -170,34 +140,66 @@ class CodexParser {
170
140
  passage.scripture = this.scripturize(passage)
171
141
  passage.passages = this.populate(result.entities[0], passage.verses)
172
142
  passage.indices = result.indices
173
- passage.entities = result.entities[0]
174
- if (passage.entities.translations) {
175
- passage.version = {
176
- name: passage.entities.translations[0].translation,
177
- alias: passage.entities.translations[0].alias,
178
- abbreviation: passage.entities.translations[0].osis,
179
- }
180
- }
181
143
  this.passages.push(passage)
182
144
  }
183
145
  this.found = []
146
+ this.versification()
184
147
  return this
185
148
  }
186
149
 
150
+ versification() {
151
+ for (let i = 0; i < this.passages.length; i++) {
152
+ const passage = this.passages[i]
153
+ const hasVersification = this.versificationDifferences[passage.book]
154
+ for (let j = 0; j < passage.passages.length; j++) {
155
+ const subPassage = passage.passages[j]
156
+ if (hasVersification) {
157
+ if (this.versificationDifferences[passage.book][subPassage.chapter + ":" + subPassage.verse])
158
+ subPassage.versification =
159
+ this.versificationDifferences[passage.book][subPassage.chapter + ":" + subPassage.verse]
160
+ }
161
+ }
162
+ }
163
+ }
164
+
165
+ /**
166
+ * Populate a Set of passages from entities.start.v to entities.end.v,
167
+ * and then add any additional verses from the verses array.
168
+ *
169
+ * @param {Object} entities - Entities object from the bible-passage-reference-parser
170
+ * @param {Array} verses - Array of verse numbers to add to the set of passages
171
+ * @return {Array} Array of passage objects
172
+ */
187
173
  populate(entities, verses) {
188
174
  let passages = []
189
175
  for (let i = entities.start.v; i <= entities.end.v; i++) {
190
176
  passages.push({
191
- book: entities.start.b,
177
+ book: this.bookify(entities.start.b),
192
178
  chapter: entities.start.c,
193
179
  verse: i,
194
180
  })
195
181
  }
196
182
 
197
183
  if (verses.length > 1) {
184
+ const hasDashes = verses.find((verse) => verse.includes("-"))
185
+ if (hasDashes) {
186
+ const newVerses = []
187
+ for (let i = 0; i < verses.length; i++) {
188
+ const verse = verses[i]
189
+ if (/[-–—]/gim.verse) {
190
+ const [start, end] = verse.split("-").map((v) => parseInt(v))
191
+ for (let j = start; j <= end; j++) {
192
+ newVerses.push(j)
193
+ }
194
+ } else {
195
+ newVerses.push(parseInt(verse))
196
+ }
197
+ }
198
+ verses = newVerses.sort((a, b) => a - b)
199
+ }
198
200
  for (let i = 0; i < verses.length; i++) {
199
201
  const passage = {
200
- book: entities.start.b,
202
+ book: this.bookify(entities.start.b),
201
203
  chapter: entities.start.c,
202
204
  verse: verses[i],
203
205
  }
@@ -218,6 +220,14 @@ class CodexParser {
218
220
  return chapter.start.c
219
221
  }
220
222
 
223
+ /**
224
+ * Given a passage, return an array of verses. If the passage is a range, the
225
+ * array will contain a single string in the format "start-end". If the passage
226
+ * is not a range, the array will contain each verse number as a separate element.
227
+ *
228
+ * @param {Object} passage - A passage object from the bible-passage-reference-parser
229
+ * @return {Array} Array of verse numbers
230
+ */
221
231
  versify(passage) {
222
232
  if (passage.start.v !== passage.end.v) {
223
233
  if (passage.type === "range" || passage.type === "ff") {
@@ -279,7 +289,10 @@ class CodexParser {
279
289
  }
280
290
 
281
291
  /**
282
- * @param {object} passage - A passage object
292
+ * Converts a passage object into a scripturize object with human-readable name, chapter and verses and a hash.
293
+ *
294
+ * @param {object} passage - The passage object to scripturize.
295
+ * @return {object} The object with the human-readable name, chapter and verses and a hash.
283
296
  */
284
297
  scripturize(passage) {
285
298
  const { book, chapter, verses, to } = passage
@@ -288,198 +301,17 @@ class CodexParser {
288
301
  if (to) {
289
302
  parts.push("-", to.chapter, ":", to.verses)
290
303
  }
291
- return parts
304
+ const full = parts
292
305
  .join(" ")
293
306
  .replace(/\s+:\s+/g, ":")
294
307
  .replace(/\s[-–—]\s/, "-")
295
308
  .trim()
296
- }
297
- find(text) {
298
- const books = [...Object.keys(this.abbrevations), ...this.bible.new, ...this.bible.old]
299
-
300
- let newText = ""
301
-
302
- //add the prestringed versions e.g. 1 Peter
303
- for (let b = 0; b < this.preStringed.length; b++) {
304
- for (let pre = 0; pre < this.preStrings.length; pre++) {
305
- books.push(this.preStrings[pre] + " " + this.preStringed[b])
306
- }
307
- }
308
- // add the book name with . at the end as this seems to be added sometimes, at least to the shortened forms
309
- const length = books.length
310
- for (let b = 0; b < length; b++) {
311
- books.push(books[b] + ".")
312
- }
313
-
314
- // sort descending - longer items first
315
- books.sort((a, b) => b.length - a.length)
316
- let booksAt = []
317
- // go thro' each book finding where it matches in text
318
- for (let b = 0; b < books.length; b++) {
319
- const book = books[b]
320
- let chNoInText = 0
321
- while (chNoInText < text.length) {
322
- let j = text.indexOf(book, chNoInText)
323
- if (j < 0) break
324
- if (j + book.length < text.length && !text.charAt(j + book.length).match(/^[a-z]+$/)) {
325
- booksAt.push([book, j])
326
- let replacement = book
327
- for (let k = 0; k < book.length; k++) {
328
- replacement = replacement.replace(book.charAt(k), "X")
329
- }
330
- text = text.replace(book, replacement) // to prevent a shorter version matching
331
- }
332
- chNoInText = j + book.length + 1
333
- }
334
- }
335
- // into ascending order of start position
336
- booksAt.sort(function (a, b) {
337
- return a[1] - b[1]
338
- })
339
- newText = ""
340
- let chNoInText = 0
341
- for (let b = 0; b < booksAt.length; b++) {
342
- while (chNoInText < booksAt[b][1]) {
343
- //copy across characters to start of book
344
- newText += text.charAt(chNoInText)
345
- chNoInText++
346
- }
347
- newText += "<span class='passage'>" + booksAt[b][0]
348
- let passage = booksAt[b][0]
349
- chNoInText += booksAt[b][0].length //skip the 'fill-in characters
350
- let abbr
351
- let index = []
352
- for (let i = 0; i < 100; i++) {
353
- chNoInText++
354
- let nextCh = text.charAt(chNoInText)
355
- const testStr = text.substring(chNoInText - passage.length, chNoInText + 5).toLowerCase()
356
- if (testStr.includes("lxx")) abbr = "lxx"
357
- if (testStr.includes("na")) abbr = "na"
358
- if (testStr.includes("ubs")) abbr = "ubs"
359
- if (testStr.includes("mt")) abbr = "mt"
360
- if (testStr.includes("bhs")) abbr = "bhs"
361
- if (testStr.includes("lxx")) abbr = "lxx"
362
- if (testStr.includes("na")) abbr = "na"
363
- if (testStr.includes("ubs")) abbr = "ubs"
364
- if (testStr.includes("mt")) abbr = "mt"
365
- if (testStr.includes("bhs")) abbr = "bhs"
366
- //test whether are at the end of the chapter(s) and verse(s)
367
- if (nextCh.match(/^[a-z]+$/) && nextCh !== "f" && nextCh !== "ff" && nextCh !== "a") break
368
- if (nextCh.match(/^[A-Z]+$/)) break
369
- newText += text.charAt(chNoInText - 1)
370
- passage += text.charAt(chNoInText - 1)
371
- index.push(chNoInText - 1)
372
- }
373
-
374
- index = [index[0], index[index.length - 1]]
375
- console.log(index)
376
- this.found.push(passage.trim() + (abbr ? " " + abbr.toUpperCase() : ""))
377
- newText += "</span>&nbsp;"
378
- }
379
- this.text = newText
380
- return this
381
- }
382
-
383
- getText() {
384
- return this.text
385
- }
386
-
387
- enhance() {
388
- if (this.found.length > 0) {
389
- for (let i = 0; i < this.found.length; i++) {
390
- const found = this.found[i]
391
- const book = this.bookify(this.found[i].match(this.bookRegex)[0])
392
- const passageWithoutBook = found.replace(book, "")
393
- let chapter, verse
394
- if (/[:\.]/.test(passageWithoutBook)) {
395
- chapter = parseInt(passageWithoutBook.split(":").shift().trim(), 10)
396
- verse = parseInt(passageWithoutBook.split(":").pop().trim(), 10)
397
- } else {
398
- if (/\d+/gim.test(passageWithoutBook)) {
399
- chapter = parseInt(passageWithoutBook.trim())
400
- verse = null
401
- }
402
- }
403
-
404
- let type = "verseRange"
405
-
406
- const passage = {
407
- original: this.found[i],
408
- book: this.bookify(this.found[i].match(this.bookRegex)[0]),
409
- chapter: this.found[i].match(this.chapterRegex),
410
- verse: this.found[i].match(/(?<=[.:])(\d+.+)/)[0],
411
- }
412
- this.passages.push(passage)
413
- }
309
+ const hash = full.toLowerCase().replace(/ /g, "_").replace(/:/g, ".").replace(/-/g, ".").replace(/,/g, ".")
310
+ return {
311
+ passage: full,
312
+ cv: chapter + colon + verses,
313
+ hash,
414
314
  }
415
- return this.passages
416
- }
417
-
418
- regex(text) {
419
- this.found = text.match(this.scripturesRegex)
420
- return this
421
- }
422
-
423
- regexParser() {
424
- this.passages = []
425
- for (let i = 0; i < this.found.length; i++) {
426
- let verse, chapter
427
- const hasChapterRange = this.found[i].match(/(?<=-\s?)\b\d+[.:].+\b/)
428
- const book = this.found[i].match(this.bookRegex)
429
- if (book === null) continue
430
- chapter = this.found[i].replace(book[0], "").match(this.chapterRegex)
431
-
432
- if (Array.isArray(chapter)) {
433
- chapter = chapter[0]
434
- }
435
- if (
436
- this.bookify(book).toLowerCase() === "jude" ||
437
- this.bookify(book).toLowerCase() === "philemon" ||
438
- this.bookify(book).toLowerCase() === "obadiah" ||
439
- this.bookify(book).toLowerCase() === "2 john" ||
440
- this.bookify(book).toLowerCase() === "3 john"
441
- ) {
442
- verse = this.found[i].split(" ")[1]
443
- chapter = "1"
444
- } else {
445
- if (this.found[i].match(this.verseRegex) && !hasChapterRange)
446
- verse = this.found[i].match(this.verseRegex)[0].replace(/[:.]/, "").trim()
447
- else if (this.found[i].match(this.verseRegex) && hasChapterRange)
448
- verse = this.found[i].match(this.verseRegex)
449
- ? this.found[i].match(this.verseRegex)[0].split("-")[0].trim()
450
- : ["Empty"]
451
- }
452
- if (!verse && this.found[i].match(/\d+/)) {
453
- chapter = this.found[i].match(/\d+/)[0]
454
- }
455
-
456
- const passage = {
457
- original: this.found[i].replace(/([.,])\1*$/, "").trim(),
458
- book: this.bookify(book),
459
- chapter: chapter,
460
- verses: verse ?? [],
461
- }
462
-
463
- if (hasChapterRange) {
464
- passage.to = {
465
- book: passage.book,
466
- chapter: hasChapterRange[0].match(this.chapterRegex)[0],
467
- verses: hasChapterRange[0].match(this.verseRegex)[0],
468
- }
469
- passage.to.verses = passage.to.verses.split(/,/).filter(Boolean)
470
- passage.to.testament = this.bible.old.includes(passage.to.book) ? "old" : "new"
471
- }
472
- passage.verses =
473
- typeof passage.verses !== "object"
474
- ? passage.verses.split(/,/).filter(Boolean)
475
- : passage.verses.filter((item) => item.trim())
476
- passage.testament = this.bible.old.includes(passage.book) ? "old" : "new"
477
- passage.scripture = this.scripturize(passage)
478
- this.passages.push(passage)
479
- }
480
-
481
- this.found = this.passages.map((passage) => passage.scripture)
482
- return this
483
315
  }
484
316
  }
485
317
 
package/src/functions.js CHANGED
@@ -3,4 +3,14 @@ const dump = (item) => {
3
3
  console.log(util.inspect(item, { depth: null, colors: true }))
4
4
  }
5
5
 
6
- module.exports.dump = dump
6
+ function dd(message) {
7
+ dump(message)
8
+ // Optionally, you can also force the script to stop execution
9
+ // by throwing an error
10
+ process.exit(1)
11
+ }
12
+
13
+ module.exports = {
14
+ dump,
15
+ dd,
16
+ }
@@ -0,0 +1,623 @@
1
+ const versified = {
2
+ Genesis: {
3
+ "31:55": {
4
+ lxx: "32:1",
5
+ mt: "31:55",
6
+ eng: "31:55",
7
+ },
8
+ "31:48": {
9
+ lxx: "31:47-48",
10
+ mt: "31:48",
11
+ eng: "31:48",
12
+ },
13
+ "31:52": {
14
+ lxx: "31:48",
15
+ mt: "31:52",
16
+ eng: "31:52",
17
+ },
18
+ "32:1": {
19
+ lxx: "32:2",
20
+ mt: "32:1",
21
+ eng: "32:1",
22
+ },
23
+ "32:2": {
24
+ lxx: "32:3",
25
+ mt: "32:2",
26
+ eng: "32:2",
27
+ },
28
+ "32:3": {
29
+ lxx: "32:4",
30
+ mt: "32:3",
31
+ eng: "32:3",
32
+ },
33
+ "32:4": {
34
+ lxx: "32:5",
35
+ mt: "32:4",
36
+ eng: "32:4",
37
+ },
38
+ "32:5": {
39
+ lxx: "32:6",
40
+ mt: "32:5",
41
+ eng: "32:5",
42
+ },
43
+ "32:6": {
44
+ lxx: "32:7",
45
+ mt: "32:6",
46
+ eng: "32:6",
47
+ },
48
+ "32:7": {
49
+ lxx: "32:8",
50
+ mt: "32:7",
51
+ eng: "32:7",
52
+ },
53
+ "32:8": {
54
+ lxx: "32:9",
55
+ mt: "32:8",
56
+ eng: "32:8",
57
+ },
58
+ "32:9": {
59
+ lxx: "32:10",
60
+ mt: "32:9",
61
+ eng: "32:9",
62
+ },
63
+ "32:10": {
64
+ lxx: "32:11",
65
+ mt: "32:10",
66
+ eng: "32:10",
67
+ },
68
+ "32:11": {
69
+ lxx: "32:12",
70
+ mt: "32:11",
71
+ eng: "32:11",
72
+ },
73
+ "32:12": {
74
+ lxx: "32:13",
75
+ mt: "32:12",
76
+ eng: "32:12",
77
+ },
78
+ "32:13": {
79
+ lxx: "32:14",
80
+ mt: "32:13",
81
+ eng: "32:13",
82
+ },
83
+ "32:14": {
84
+ lxx: "32:15",
85
+ mt: "32:14",
86
+ eng: "32:14",
87
+ },
88
+ "32:15": {
89
+ lxx: "32:16",
90
+ mt: "32:15",
91
+ eng: "32:15",
92
+ },
93
+ "32:16": {
94
+ lxx: "32:17",
95
+ mt: "32:16",
96
+ eng: "32:16",
97
+ },
98
+ "32:17": {
99
+ lxx: "32:18",
100
+ mt: "32:17",
101
+ eng: "32:17",
102
+ },
103
+ "32:18": {
104
+ lxx: "32:19",
105
+ mt: "32:18",
106
+ eng: "32:18",
107
+ },
108
+ "32:19": {
109
+ lxx: "32:20",
110
+ mt: "32:19",
111
+ eng: "32:19",
112
+ },
113
+ "32:20": {
114
+ lxx: "32:21",
115
+ mt: "32:20",
116
+ eng: "32:20",
117
+ },
118
+ "32:21": {
119
+ lxx: "32:22",
120
+ mt: "32:21",
121
+ eng: "32:21",
122
+ },
123
+ "32:22": {
124
+ lxx: "32:23",
125
+ mt: "32:22",
126
+ eng: "32:22",
127
+ },
128
+ "32:23": {
129
+ lxx: "32:24",
130
+ mt: "32:23",
131
+ eng: "32:23",
132
+ },
133
+ "32:24": {
134
+ lxx: "32:25",
135
+ mt: "32:24",
136
+ eng: "32:24",
137
+ },
138
+ "32:25": {
139
+ lxx: "32:26",
140
+ mt: "32:25",
141
+ eng: "32:25",
142
+ },
143
+ "32:26": {
144
+ lxx: "32:27",
145
+ mt: "32:26",
146
+ eng: "32:26",
147
+ },
148
+ "32:27": {
149
+ lxx: "32:28",
150
+ mt: "32:27",
151
+ eng: "32:27",
152
+ },
153
+ "32:28": {
154
+ lxx: "32:29",
155
+ mt: "32:28",
156
+ eng: "32:28",
157
+ },
158
+ "32:29": {
159
+ lxx: "32:30",
160
+ mt: "32:29",
161
+ eng: "32:29",
162
+ },
163
+ "32:30": {
164
+ lxx: "32:31",
165
+ mt: "32:30",
166
+ eng: "32:30",
167
+ },
168
+ "32:31": {
169
+ lxx: "32:32",
170
+ mt: "32:31",
171
+ eng: "32:31",
172
+ },
173
+ "32:32": {
174
+ lxx: "32:33",
175
+ mt: "32:32",
176
+ eng: "32:32",
177
+ },
178
+ "35:16": {
179
+ lxx: "35:16",
180
+ mt: "35:16",
181
+ eng: "35:16",
182
+ },
183
+ "35:21": {
184
+ lxx: "35:16",
185
+ mt: "35:21",
186
+ eng: "35:21",
187
+ },
188
+ "35:22": {
189
+ lxx: "35:21",
190
+ mt: "35:22",
191
+ eng: "35:22",
192
+ },
193
+ },
194
+ Exodus: {
195
+ "8:1": {
196
+ lxx: "8:1",
197
+ mt: "7:26",
198
+ eng: "8:1",
199
+ },
200
+ "8:2": {
201
+ lxx: "8:2",
202
+ mt: "7:27",
203
+ eng: "8:2",
204
+ },
205
+ "8:3": {
206
+ lxx: "8:3",
207
+ mt: "7:28",
208
+ eng: "8:3",
209
+ },
210
+ "8:4": {
211
+ lxx: "8:4",
212
+ mt: "7:29",
213
+ eng: "8:4",
214
+ },
215
+ "8:5": {
216
+ lxx: "8:5",
217
+ mt: "8:1",
218
+ eng: "8:5",
219
+ },
220
+ "8:6": {
221
+ lxx: "8:6",
222
+ mt: "8:2",
223
+ eng: "8:6",
224
+ },
225
+ "8:7": {
226
+ lxx: "8:7",
227
+ mt: "8:3",
228
+ eng: "8:7",
229
+ },
230
+ "8:8": {
231
+ lxx: "8:8",
232
+ mt: "8:4",
233
+ eng: "8:8",
234
+ },
235
+ "8:9": {
236
+ lxx: "8:9",
237
+ mt: "8:5",
238
+ eng: "8:9",
239
+ },
240
+ "8:10": {
241
+ lxx: "8:10",
242
+ mt: "8:6",
243
+ eng: "8:10",
244
+ },
245
+ "8:11": {
246
+ lxx: "8:11",
247
+ mt: "8:7",
248
+ eng: "8:11",
249
+ },
250
+ "8:12": {
251
+ lxx: "8:12",
252
+ mt: "8:8",
253
+ eng: "8:12",
254
+ },
255
+ "8:13": {
256
+ lxx: "8:13",
257
+ mt: "8:9",
258
+ eng: "8:13",
259
+ },
260
+ "8:14": {
261
+ lxx: "8:14",
262
+ mt: "8:10",
263
+ eng: "8:14",
264
+ },
265
+ "8:15": {
266
+ lxx: "8:15",
267
+ mt: "8:11",
268
+ eng: "8:15",
269
+ },
270
+ "8:16": {
271
+ lxx: "8:16",
272
+ mt: "8:12",
273
+ eng: "8:16",
274
+ },
275
+ "8:17": {
276
+ lxx: "8:17",
277
+ mt: "8:13",
278
+ eng: "8:17",
279
+ },
280
+ "8:18": {
281
+ lxx: "8:18",
282
+ mt: "8:14",
283
+ eng: "8:18",
284
+ },
285
+ "8:19": {
286
+ lxx: "8:19",
287
+ mt: "8:15",
288
+ eng: "8:19",
289
+ },
290
+ "8:20": {
291
+ lxx: "8:20",
292
+ mt: "8:16",
293
+ eng: "8:20",
294
+ },
295
+ "8:21": {
296
+ lxx: "8:21",
297
+ mt: "8:17",
298
+ eng: "8:21",
299
+ },
300
+ "8:22": {
301
+ lxx: "8:22",
302
+ mt: "8:18",
303
+ eng: "8:22",
304
+ },
305
+ "8:23": {
306
+ lxx: "8:23",
307
+ mt: "8:19",
308
+ eng: "8:23",
309
+ },
310
+ "8:24": {
311
+ lxx: "8:24",
312
+ mt: "8:20",
313
+ eng: "8:24",
314
+ },
315
+ "8:25": {
316
+ lxx: "8:25",
317
+ mt: "8:21",
318
+ eng: "8:25",
319
+ },
320
+ "8:26": {
321
+ lxx: "8:26",
322
+ mt: "8:22",
323
+ eng: "8:26",
324
+ },
325
+ "8:27": {
326
+ lxx: "8:27",
327
+ mt: "8:23",
328
+ eng: "8:27",
329
+ },
330
+ "8:28": {
331
+ lxx: "8:28",
332
+ mt: "8:24",
333
+ eng: "8:28",
334
+ },
335
+ "8:29": {
336
+ lxx: "8:29",
337
+ mt: "8:25",
338
+ eng: "8:29",
339
+ },
340
+ "8:30": {
341
+ lxx: "8:30",
342
+ mt: "8:26",
343
+ eng: "8:30",
344
+ },
345
+ "8:31": {
346
+ lxx: "8:31",
347
+ mt: "8:27",
348
+ eng: "8:31",
349
+ },
350
+ "8:32": {
351
+ lxx: "8:32",
352
+ mt: "8:28",
353
+ eng: "8:32",
354
+ },
355
+ "20:13": {
356
+ lxx: "20:13",
357
+ mt: "20:14",
358
+ eng: "20:13",
359
+ },
360
+ "20:14": {
361
+ lxx: "20:14",
362
+ mt: "20:15",
363
+ eng: "20:14",
364
+ },
365
+ "20:15": {
366
+ lxx: "20:15",
367
+ mt: "20:13",
368
+ eng: "20:15",
369
+ },
370
+ "22:1": {
371
+ lxx: "22:1",
372
+ mt: "21:37",
373
+ eng: "22:1",
374
+ },
375
+ "22:2": {
376
+ lxx: "22:2",
377
+ mt: "22:1",
378
+ eng: "22:2",
379
+ },
380
+ "22:3": {
381
+ lxx: "22:3",
382
+ mt: "22:2",
383
+ eng: "22:3",
384
+ },
385
+ "22:4": {
386
+ lxx: "22:4",
387
+ mt: "22:3",
388
+ eng: "22:4",
389
+ },
390
+ "22:5": {
391
+ lxx: "22:5",
392
+ mt: "22:4",
393
+ eng: "22:5",
394
+ },
395
+ "22:6": {
396
+ lxx: "22:6",
397
+ mt: "22:5",
398
+ eng: "22:6",
399
+ },
400
+ "22:7": {
401
+ lxx: "22:7",
402
+ mt: "22:6",
403
+ eng: "22:7",
404
+ },
405
+ "22:8": {
406
+ lxx: "22:8",
407
+ mt: "22:7",
408
+ eng: "22:8",
409
+ },
410
+ "22:9": {
411
+ lxx: "22:9",
412
+ mt: "22:8",
413
+ eng: "22:9",
414
+ },
415
+ "22:10": {
416
+ lxx: "22:10",
417
+ mt: "22:9",
418
+ eng: "22:10",
419
+ },
420
+ "22:11": {
421
+ lxx: "22:11",
422
+ mt: "22:10",
423
+ eng: "22:11",
424
+ },
425
+ "22:12": {
426
+ lxx: "22:12",
427
+ mt: "22:11",
428
+ eng: "22:12",
429
+ },
430
+ "22:13": {
431
+ lxx: "22:13",
432
+ mt: "22:12",
433
+ eng: "22:13",
434
+ },
435
+ "22:14": {
436
+ lxx: "22:14",
437
+ mt: "22:13",
438
+ eng: "22:14",
439
+ },
440
+ "22:15": {
441
+ lxx: "22:15",
442
+ mt: "22:14",
443
+ eng: "22:15",
444
+ },
445
+ "22:16": {
446
+ lxx: "22:16",
447
+ mt: "22:15",
448
+ eng: "22:16",
449
+ },
450
+ "22:17": {
451
+ lxx: "22:17",
452
+ mt: "22:16",
453
+ eng: "22:17",
454
+ },
455
+ "22:18": {
456
+ lxx: "22:18",
457
+ mt: "22:17",
458
+ eng: "22:18",
459
+ },
460
+ "22:19": {
461
+ lxx: "22:19",
462
+ mt: "22:18",
463
+ eng: "22:19",
464
+ },
465
+ "22:20": {
466
+ lxx: "22:20",
467
+ mt: "22:19",
468
+ eng: "22:20",
469
+ },
470
+ "22:21": {
471
+ lxx: "22:21",
472
+ mt: "22:20",
473
+ eng: "22:21",
474
+ },
475
+ "22:22": {
476
+ lxx: "22:22",
477
+ mt: "22:21",
478
+ eng: "22:22",
479
+ },
480
+ "22:23": {
481
+ lxx: "22:23",
482
+ mt: "22:22",
483
+ eng: "22:23",
484
+ },
485
+ "22:24": {
486
+ lxx: "22:24",
487
+ mt: "22:23",
488
+ eng: "22:24",
489
+ },
490
+ "22:25": {
491
+ lxx: "22:25",
492
+ mt: "22:24",
493
+ eng: "22:25",
494
+ },
495
+ "22:26": {
496
+ lxx: "22:26",
497
+ mt: "22:25",
498
+ eng: "22:26",
499
+ },
500
+ "22:27": {
501
+ lxx: "22:27",
502
+ mt: "22:26",
503
+ eng: "22:27",
504
+ },
505
+ "22:28": {
506
+ lxx: "22:28",
507
+ mt: "22:27",
508
+ eng: "22:28",
509
+ },
510
+ "22:29": {
511
+ lxx: "22:29",
512
+ mt: "22:28",
513
+ eng: "22:29",
514
+ },
515
+ "22:30": {
516
+ lxx: "22:30",
517
+ mt: "22:29",
518
+ eng: "22:30",
519
+ },
520
+ "22:31": {
521
+ lxx: "22:31",
522
+ mt: "22:30",
523
+ eng: "22:31",
524
+ },
525
+ "35:9": {
526
+ lxx: "35:8",
527
+ mt: "35:9",
528
+ eng: "35:9",
529
+ },
530
+ "35:10": {
531
+ lxx: "35:9",
532
+ mt: "35:10",
533
+ eng: "35:10",
534
+ },
535
+ "35:11": {
536
+ lxx: "35:10",
537
+ mt: "35:11",
538
+ eng: "35:11",
539
+ },
540
+ "35:12": {
541
+ lxx: "35:11",
542
+ mt: "35:12",
543
+ eng: "35:12",
544
+ },
545
+ "35:17": {
546
+ lxx: "35:12",
547
+ mt: "35:17",
548
+ eng: "35:17",
549
+ },
550
+ "35:13": {
551
+ lxx: "35:15",
552
+ mt: "35:13",
553
+ eng: "35:13",
554
+ },
555
+ "35:14": {
556
+ lxx: "35:16",
557
+ mt: "35:14",
558
+ eng: "35:14",
559
+ },
560
+ "35:16": {
561
+ lxx: "35:17",
562
+ mt: "35:16",
563
+ eng: "35:16",
564
+ },
565
+ "35:19": {
566
+ lxx: "35:18",
567
+ mt: "35:19",
568
+ eng: "35:19",
569
+ },
570
+ "35:15": {
571
+ lxx: "35:19",
572
+ mt: "35:15",
573
+ eng: "35:15",
574
+ },
575
+ "36:8": {
576
+ lxx: "37:1",
577
+ mt: "36:8",
578
+ eng: "36:8",
579
+ },
580
+ "36:9": {
581
+ lxx: "37:2",
582
+ mt: "36:9",
583
+ eng: "36:9",
584
+ },
585
+ "36:35": {
586
+ lxx: "37:3",
587
+ mt: "36:35",
588
+ eng: "36:35",
589
+ },
590
+ "36:36": {
591
+ lxx: "37:4",
592
+ mt: "36:36",
593
+ eng: "36:36",
594
+ },
595
+ "36:37": {
596
+ lxx: "37:5",
597
+ mt: "36:37",
598
+ eng: "36:37",
599
+ },
600
+ "36:38": {
601
+ lxx: "37:6",
602
+ mt: "36:38",
603
+ eng: "36:38",
604
+ },
605
+ },
606
+ Psalms: {
607
+ "23:1": {
608
+ lxx: "22:1",
609
+ mt: "23:1",
610
+ eng: "23:1",
611
+ },
612
+ },
613
+ "1 Samuel": {
614
+ "20:42": {
615
+ lxx: "20:41",
616
+ mt: "20:42",
617
+ eng: "20:42",
618
+ },
619
+ },
620
+ // Add more books and verses as needed
621
+ }
622
+
623
+ module.exports = versified
package/tests/single.js CHANGED
@@ -3,7 +3,7 @@ const dump = require("../src/functions.js").dump
3
3
 
4
4
  const parser = new BibleParser()
5
5
 
6
- const text = "Job 1:1-5"
6
+ const text = "Genesis 22:1-2,14,19"
7
7
 
8
8
  const passages = parser.parse(text).getPassages()
9
9
 
@@ -0,0 +1,8 @@
1
+ const BibleParser = require("../src/CodexParser")
2
+ const dump = require("../src/functions").dump
3
+
4
+ const parser = new BibleParser()
5
+
6
+ const passages = parser.parse("Exodus 8:1").getPassages()
7
+
8
+ dump(passages)