node-sword-interface 1.0.23 → 1.0.24
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/API.md +28 -0
- package/index.js +19 -0
- package/package.json +2 -2
package/API.md
CHANGED
|
@@ -60,6 +60,8 @@ This is the main class of node-sword-interface and it provides a set of static f
|
|
|
60
60
|
* [.getBookHeaderList(moduleCode, bookCode, withAbsoluteVerseNumbers)](#NodeSwordInterface+getBookHeaderList) ⇒ [<code>Array.<VerseObject></code>](#VerseObject)
|
|
61
61
|
* [.getBookChapterCount(moduleCode, bookCode)](#NodeSwordInterface+getBookChapterCount)
|
|
62
62
|
* [.getChapterVerseCount(moduleCode, bookCode, chapter)](#NodeSwordInterface+getChapterVerseCount)
|
|
63
|
+
* [.getAllChapterVerseCounts(moduleCode, bookCode)](#NodeSwordInterface+getAllChapterVerseCounts) ⇒ <code>Number</code>
|
|
64
|
+
* [.getBookVerseCount(moduleCode, bookCode)](#NodeSwordInterface+getBookVerseCount) ⇒ <code>Number</code>
|
|
63
65
|
* [.getBibleText(moduleCode)](#NodeSwordInterface+getBibleText) ⇒ [<code>Array.<VerseObject></code>](#VerseObject)
|
|
64
66
|
* [.getBookIntroduction(moduleCode, bookCode)](#NodeSwordInterface+getBookIntroduction) ⇒ <code>String</code>
|
|
65
67
|
* [.moduleHasBook(moduleCode, bookCode)](#NodeSwordInterface+moduleHasBook) ⇒ <code>Boolean</code>
|
|
@@ -438,6 +440,32 @@ Returns the number of verses in the given chapter.
|
|
|
438
440
|
| bookCode | <code>String</code> | The book code of the SWORD module. |
|
|
439
441
|
| chapter | <code>Number</code> | The chapter of the book. |
|
|
440
442
|
|
|
443
|
+
<a name="NodeSwordInterface+getAllChapterVerseCounts"></a>
|
|
444
|
+
|
|
445
|
+
### nodeSwordInterface.getAllChapterVerseCounts(moduleCode, bookCode) ⇒ <code>Number</code>
|
|
446
|
+
Returns an array with the chapter verse counts of all chapters of a given book.
|
|
447
|
+
|
|
448
|
+
**Kind**: instance method of [<code>NodeSwordInterface</code>](#NodeSwordInterface)
|
|
449
|
+
**Returns**: <code>Number</code> - chapterVerseCounts
|
|
450
|
+
|
|
451
|
+
| Param | Type |
|
|
452
|
+
| --- | --- |
|
|
453
|
+
| moduleCode | <code>String</code> |
|
|
454
|
+
| bookCode | <code>String</code> |
|
|
455
|
+
|
|
456
|
+
<a name="NodeSwordInterface+getBookVerseCount"></a>
|
|
457
|
+
|
|
458
|
+
### nodeSwordInterface.getBookVerseCount(moduleCode, bookCode) ⇒ <code>Number</code>
|
|
459
|
+
Returns the number verses in the given book.
|
|
460
|
+
|
|
461
|
+
**Kind**: instance method of [<code>NodeSwordInterface</code>](#NodeSwordInterface)
|
|
462
|
+
**Returns**: <code>Number</code> - The verse count of the book.
|
|
463
|
+
|
|
464
|
+
| Param | Type | Description |
|
|
465
|
+
| --- | --- | --- |
|
|
466
|
+
| moduleCode | <code>String</code> | The module code of the SWORD module. |
|
|
467
|
+
| bookCode | <code>String</code> | The book code of the SWORD module. |
|
|
468
|
+
|
|
441
469
|
<a name="NodeSwordInterface+getBibleText"></a>
|
|
442
470
|
|
|
443
471
|
### nodeSwordInterface.getBibleText(moduleCode) ⇒ [<code>Array.<VerseObject></code>](#VerseObject)
|
package/index.js
CHANGED
|
@@ -445,6 +445,25 @@ class NodeSwordInterface {
|
|
|
445
445
|
return this.nativeInterface.getChapterVerseCount(moduleCode, bookCode, chapter);
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
+
/**
|
|
449
|
+
* Returns an array with the chapter verse counts of all chapters of a given book.
|
|
450
|
+
*
|
|
451
|
+
* @param {String} moduleCode
|
|
452
|
+
* @param {String} bookCode
|
|
453
|
+
* @returns {Number} chapterVerseCounts
|
|
454
|
+
*/
|
|
455
|
+
getAllChapterVerseCounts(moduleCode, bookCode) {
|
|
456
|
+
let chapterVerseCounts = [];
|
|
457
|
+
|
|
458
|
+
let bookChapterCount = this.nativeInterface.getBookChapterCount(moduleCode, bookCode);
|
|
459
|
+
for (let i = 0; i < bookChapterCount; i++) {
|
|
460
|
+
let currentChapterVerseCount = this.nativeInterface.getChapterVerseCount(moduleCode, bookCode, i);
|
|
461
|
+
chapterVerseCounts.push(currentChapterVerseCount);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
return chapterVerseCounts;
|
|
465
|
+
}
|
|
466
|
+
|
|
448
467
|
/**
|
|
449
468
|
* Returns the number verses in the given book.
|
|
450
469
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-sword-interface",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"description": "Javascript (N-API) interface to SWORD library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"C++",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"url": "https://github.com/ezra-project/node-sword-interface.git"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"jsdoc-to-markdown": "^8.0.
|
|
33
|
+
"jsdoc-to-markdown": "^8.0.3",
|
|
34
34
|
"node-gyp": "^9.1.0"
|
|
35
35
|
}
|
|
36
36
|
}
|