@helloao/tools 0.0.18 → 0.0.20

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.
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Normalizes the given language code into a ISO 639 code.
3
+ * @param language The language code to normalize.
4
+ */
5
+ export declare function normalizeLanguage(language: string): string;
6
+ /**
7
+ * Gets the ID of the translation.
8
+ * @param translation The translation to get the ID for.
9
+ */
10
+ export declare function getTranslationId(translationId: string): string;
11
+ export declare function isEmptyOrWhitespace(str: string | null | undefined): boolean;
12
+ export declare function getFirstNonEmpty<T extends string>(...values: T[]): T;
13
+ export interface VerseRef {
14
+ book: string;
15
+ chapter: number;
16
+ verse: number;
17
+ /**
18
+ * The rest of the content of the verse.
19
+ */
20
+ content?: string;
21
+ /**
22
+ * The chapter that the verse reference ends at.
23
+ */
24
+ endChapter?: number;
25
+ /**
26
+ * The verse that the verse reference ends at.
27
+ */
28
+ endVerse?: number;
29
+ }
30
+ /**
31
+ * Parses the given verse reference.
32
+ * Formatted like "GEN 1:1".
33
+ *
34
+ * @param text The reference to parse.
35
+ */
36
+ export declare function parseVerseReference(text: string): VerseRef | null;
37
+ /**
38
+ * Gets the ID of the given book.
39
+ * Returns null if the ID could not be found.
40
+ * @param book The name/ID of the book.
41
+ */
42
+ export declare function getBookId(book: string): string | null;
43
+ /**
44
+ * A brief list of verses which may appear in some older translations
45
+ * but are not present in more modern translations.
46
+ */
47
+ export declare const KNOWN_SKIPPED_VERSES: Set<string>;
48
+ //# sourceMappingURL=utils.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helloao/tools",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "A set of tools for managing HelloAO's Free Bible API",
5
5
  "main": "./dist/cjs/index.cjs",
6
6
  "module": "./dist/esm/index.js",