@joewalker/scripture-ref 0.4.0
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/CHANGELOG.md +24 -0
- package/LICENSE +202 -0
- package/README.md +102 -0
- package/dist/book/books.d.ts +45 -0
- package/dist/book/books.js +196 -0
- package/dist/book/books.js.map +1 -0
- package/dist/book/esv.json +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/passage/bible-info.d.ts +64 -0
- package/dist/passage/bible-info.js +874 -0
- package/dist/passage/bible-info.js.map +1 -0
- package/dist/passage/passage-tally.d.ts +25 -0
- package/dist/passage/passage-tally.js +44 -0
- package/dist/passage/passage-tally.js.map +1 -0
- package/dist/passage/passage.d.ts +44 -0
- package/dist/passage/passage.js +120 -0
- package/dist/passage/passage.js.map +1 -0
- package/dist/passage/verse-range.d.ts +74 -0
- package/dist/passage/verse-range.js +213 -0
- package/dist/passage/verse-range.js.map +1 -0
- package/dist/passage/verse.d.ts +104 -0
- package/dist/passage/verse.js +295 -0
- package/dist/passage/verse.js.map +1 -0
- package/package.json +56 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Verse, ACCURACY } from './passage/verse.js';
|
|
2
|
+
export type { Accuracy, VerseParseResult } from './passage/verse.js';
|
|
3
|
+
export { VerseRange } from './passage/verse-range.js';
|
|
4
|
+
export { Passage } from './passage/passage.js';
|
|
5
|
+
export { PassageTally } from './passage/passage-tally.js';
|
|
6
|
+
export { getPassageText, search } from './book/books.js';
|
|
7
|
+
export type { Book } from './book/books.js';
|
|
8
|
+
export { findBookNumber, getShortName, getLongName, chaptersInBook, versesInChapter, versesInBible, chaptersInBible, booksInBible, verseOrdinal, decodeOrdinal, bookNames, shortBookNames, } from './passage/bible-info.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Verse, ACCURACY } from './passage/verse.js';
|
|
2
|
+
export { VerseRange } from './passage/verse-range.js';
|
|
3
|
+
export { Passage } from './passage/passage.js';
|
|
4
|
+
export { PassageTally } from './passage/passage-tally.js';
|
|
5
|
+
export { getPassageText, search } from './book/books.js';
|
|
6
|
+
export { findBookNumber, getShortName, getLongName, chaptersInBook, versesInChapter, versesInBible, chaptersInBible, booksInBible, verseOrdinal, decodeOrdinal, bookNames, shortBookNames, } from './passage/bible-info.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzD,OAAO,EACL,cAAc,EACd,YAAY,EACZ,WAAW,EACX,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,SAAS,EACT,cAAc,GACf,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find the (1-based) book number for a given string.
|
|
3
|
+
* e.g.:
|
|
4
|
+
* - findBookNumber('genesis') === 1
|
|
5
|
+
* - findBookNumber('gen') === 1
|
|
6
|
+
* - findBookNumber('g') === undefined
|
|
7
|
+
*/
|
|
8
|
+
export declare function findBookNumber(name: string): number | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* What is the canonical short name for a book?
|
|
11
|
+
*/
|
|
12
|
+
export declare function getShortName(book: number): string;
|
|
13
|
+
/**
|
|
14
|
+
* What is the canonical long name for a book?
|
|
15
|
+
*/
|
|
16
|
+
export declare function getLongName(book: number): string;
|
|
17
|
+
/**
|
|
18
|
+
* How many chapters are there in the given book?
|
|
19
|
+
*/
|
|
20
|
+
export declare function chaptersInBook(book: number): number;
|
|
21
|
+
/**
|
|
22
|
+
* How many verses are there in the given chapter?
|
|
23
|
+
*/
|
|
24
|
+
export declare function versesInChapter(book: number, chapter: number): number;
|
|
25
|
+
/**
|
|
26
|
+
* How many verses are there in the Bible? Somewhat for completeness
|
|
27
|
+
*/
|
|
28
|
+
export declare function versesInBible(): number;
|
|
29
|
+
/**
|
|
30
|
+
* How many chapters are there in the Bible? Somewhat for completeness
|
|
31
|
+
*/
|
|
32
|
+
export declare function chaptersInBible(): number;
|
|
33
|
+
/**
|
|
34
|
+
* How many books are there in the Bible? Somewhat for completeness
|
|
35
|
+
*/
|
|
36
|
+
export declare function booksInBible(): number;
|
|
37
|
+
/**
|
|
38
|
+
* Accessor for the full list of names of the books of the Bible.
|
|
39
|
+
*/
|
|
40
|
+
export declare function bookNames(): ReadonlyArray<string>;
|
|
41
|
+
/**
|
|
42
|
+
* Accessor for the full list of names of the books of the Bible.
|
|
43
|
+
*/
|
|
44
|
+
export declare function shortBookNames(): ReadonlyArray<string>;
|
|
45
|
+
/**
|
|
46
|
+
* Where does this verse come in the Bible? Starting with Gen 1:1 as
|
|
47
|
+
* number 1 counting up one per verse and not resetting at each new
|
|
48
|
+
* chapter.
|
|
49
|
+
* @see decodeOrdinal()
|
|
50
|
+
* @param book The book part of the reference.
|
|
51
|
+
* @param chapter The current chapter
|
|
52
|
+
* @param verse The current verse
|
|
53
|
+
* @returns The ordinal number of the referenced verse
|
|
54
|
+
*/
|
|
55
|
+
export declare function verseOrdinal(book: number, chapter: number, verse: number): number;
|
|
56
|
+
/**
|
|
57
|
+
* Where does this verse come in the Bible? Starting with Gen 1:1 as
|
|
58
|
+
* number 1 counting up one per verse and not resetting at each new
|
|
59
|
+
* chapter.
|
|
60
|
+
* @see verseOrdinal()
|
|
61
|
+
* @param ordinal The ordinal number of the verse
|
|
62
|
+
* @returns A 3 tuple; book, chapter, verse
|
|
63
|
+
*/
|
|
64
|
+
export declare function decodeOrdinal(ordinal: number): [number, number, number];
|