codexparser 0.0.7 → 0.0.9

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.7",
3
+ "version": "0.0.9",
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": {
package/src/abbr.js CHANGED
@@ -230,14 +230,22 @@ const abbrevations = {
230
230
  "2Pet": "2 Peter",
231
231
  "1John": "1 John",
232
232
  "1 Jo": "1 John",
233
- "1 Jo": "1 John",
233
+ "1Jo": "1 John",
234
+ "1 Jn": "1 John",
235
+ "1Jn": "1 John",
234
236
  "1John": "1 John",
235
237
  "2John": "2 John",
236
238
  "2 Jo": "2 John",
237
- "2 Jo": "2 John",
239
+ "2 Jn": "2 John",
240
+ "2Jo": "2 John",
241
+ "2Jn": "2 John",
238
242
  "2John": "2 John",
239
243
  "2 John": "2 John",
240
244
  "3John": "3 John",
245
+ "3 Jo": "3 John",
246
+ "3 Jn": "3 John",
247
+ "3Jo": "3 John",
248
+ "3Jn": "3 John",
241
249
  "3 John": "3 John",
242
250
  Jude: "Jude",
243
251
  Jud: "Jude",
package/src/regex.js CHANGED
@@ -1,5 +1,5 @@
1
1
  const bookRegex =
2
- /(?:(?:[gG]e(?:[a-zA-Z])?|[eE]x(?:[a-zA-Z])?|[lL]e(?:[a-zA-Z])?|[nN]u(?:[a-zA-Z])?|[dD]e(?:[a-zA-Z])?|[jJ]o(?:[a-zA-Z])?|[jJ]u(?:[a-zA-Z])?|[rR]u(?:[a-zA-Z])?|1\s?[sS](?:[a-zA-Z])?|2\s?[sS](?:[a-zA-Z])?|1\s?[kK](?:[a-zA-Z])?|2\s?[kK](?:[a-zA-Z])?|1\s?[cC]hr(?:[a-zA-Z])?|2\s?[cC]hr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a-zA-Z])?|2\s?[tT](?:[a-zA-Z])?|[tT](?:[a-zA-Z])?|[pP]h(?:[a-zA-Z])?|[hH](?:[a-zA-Z])?|[jJ]a(?:[a-zA-Z])?|1\s?[pP](?:[a-zA-Z])?|2\s?[pP](?:[a-zA-Z])?|1\s?[jJ](?:[a-zA-Z])?|2\s?[jJ](?:[a-zA-Z])?|3\s?[jJ](?:[a-zA-Z])?|[jJ](:[a-zA-Z])?|[Rr|Aa](?:[a-zA-Z])?))/gim
3
3
  const bookAbbrRegex =
4
4
  /(?:(?:[gG]en|[eE]xo|[lL]ev|[nN]um|[dD]eu|[jJ]os|[jJ]dg|[rR]ut|1 [sS]a|2 [sS]a|1 [kK]gs|2 [kK]gs|1 [cC]hr|2 [cC]hr|[eE]zr|[nN]eh|[eE]st|[jJ]ob|[pP]sa|[pP]ro|[eE]cc|[sS]on|[iI]sa|[jJ]er|[lL]am|[eE]ze|[dD]an|[hH]os|[jJ]oe|[aA]mo|[oO]ba|[jJ]on|[mM]ic|[nN]ah|[hH]ab|[zZ]ep|[hH]ag|[zZ]ec|[mM]al|[mM]att|[mM]ar|[lL]uk|[jJ]oh|[aA]ct|[rR]om|1 [cC]or|2 [cC]or|[gG]al|[eE]ph|[pP]hi|[cC]ol|1 [tT]hess|2 [tT]hess|1 [tT]i|2 [tT]i|[tT]it|[pP]hm|[hH]eb|[jJ]am|1 [pP]e|2 [pP]e|1 [jJ]o|2 [jJ]o|3 [jJ]o|[jJ]ud|[rR]ev))/gim
5
5
  const chapterRegex = /(?:\s?\d+:?)/g
package/test.js CHANGED
@@ -3,7 +3,7 @@ const CodexParser = require("./src/CodexParser.js")
3
3
  const parser = new CodexParser()
4
4
  const text =
5
5
  "The passages that we are looking at tonight are found in 1 John 3:16-17, 1 Peter 1:1, and Romans 10:13, 15, 17. Please turn in your Bibles."
6
- const single = "1Cor 2.9"
6
+ const single = "jas 2.9"
7
7
  parser.parse(single)
8
8
  //parser.parse(single)
9
9
  console.log(parser.getPassages())