biblia-de-jerusalen 0.1.2 → 0.1.3
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/README.md +9 -5
- package/package.json +10 -4
- package/src/bible.ts +30 -2
- package/src/es/bible.json +44145 -0
- package/vite.config.ts +4 -23
- package/dist/bible.d.ts +0 -2
- package/dist/index.cjs.js +0 -2
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.esm.js +0 -80
- package/dist/index.esm.js.map +0 -1
- package/dist/index.umd.js +0 -2
- package/dist/index.umd.js.map +0 -1
- package/src/index.ts +0 -5
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
|
|
8
|
+
Librería con la Biblia de Jerusalén, open source!<br><br>
|
|
9
9
|
Consulta los libros de la Biblia - versión de la Biblia de Jerusalén e integra en tu página.<br>
|
|
10
10
|
Supports Node v18+, Modern Browsers (desktop and mobile).
|
|
11
11
|
</p>
|
|
@@ -17,11 +17,15 @@
|
|
|
17
17
|
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
|
+
## Quickstart setup
|
|
21
|
+
|
|
22
|
+
> TODO
|
|
23
|
+
|
|
20
24
|
## Library content
|
|
21
25
|
|
|
22
26
|
The functions to retrieve the information:
|
|
23
27
|
|
|
24
|
-
| **
|
|
25
|
-
|
|
26
|
-
| getBooks
|
|
27
|
-
| getAllBible
|
|
28
|
+
| **Contentg** | **Function** | **🇪🇸** |
|
|
29
|
+
|--------------|---------------------|--|
|
|
30
|
+
| getBooks | `getBooks()` | ✅ |
|
|
31
|
+
| getAllBible | `getAllBible()` | ✅ |
|
package/package.json
CHANGED
|
@@ -11,10 +11,7 @@
|
|
|
11
11
|
"christian",
|
|
12
12
|
"Católica"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.1.
|
|
15
|
-
"main": "dist/index.cjs.js",
|
|
16
|
-
"module": "dist/index.esm.js",
|
|
17
|
-
"types": "dist/index.d.ts",
|
|
14
|
+
"version": "0.1.3",
|
|
18
15
|
"type": "module",
|
|
19
16
|
"scripts": {
|
|
20
17
|
"build": "tsc && vite build"
|
|
@@ -27,5 +24,14 @@
|
|
|
27
24
|
"optionalDependencies": {
|
|
28
25
|
"@rollup/rollup-linux-x64-gnu": "4.9.5"
|
|
29
26
|
},
|
|
27
|
+
"main": "./dist/bible.cjs.js",
|
|
28
|
+
"module": "./dist/bible.es.js",
|
|
29
|
+
"types": "./dist/bible.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/bible.d.ts",
|
|
33
|
+
"import": "./dist/bible.es.js"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
30
36
|
"license": "MIT"
|
|
31
37
|
}
|
package/src/bible.ts
CHANGED
|
@@ -1,4 +1,32 @@
|
|
|
1
1
|
// src/bible.ts
|
|
2
|
+
import all_bible from "./es/bible.json"
|
|
3
|
+
|
|
4
|
+
export type resultBible = {
|
|
5
|
+
b: string;
|
|
6
|
+
c: string;
|
|
7
|
+
v: string;
|
|
8
|
+
content: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export class Bible {
|
|
12
|
+
#bible: Object = all_bible;
|
|
13
|
+
|
|
14
|
+
get bible(): {} {
|
|
15
|
+
return this.#bible;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Return bible book names
|
|
20
|
+
*/
|
|
21
|
+
getAllBooks(): string[] {
|
|
22
|
+
return Object.keys(this.#bible);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
getBook({name}: { name: keyof Object }): any {
|
|
26
|
+
const book: any = (this.#bible as any)[name];
|
|
27
|
+
return book;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
2
30
|
|
|
3
31
|
export function getBooks(): any[] {
|
|
4
32
|
return [
|
|
@@ -23,8 +51,8 @@ export function getBooks(): any[] {
|
|
|
23
51
|
];
|
|
24
52
|
}
|
|
25
53
|
|
|
26
|
-
export function getAllBible():
|
|
27
|
-
return
|
|
54
|
+
export function getAllBible(): Object {
|
|
55
|
+
return all_bible;
|
|
28
56
|
|
|
29
57
|
}
|
|
30
58
|
|