scripture-guide 1.0.95 → 1.1.1
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 +1 -0
- package/dist/scriptures.cjs +210 -94
- package/dist/scriptures.d.ts +23 -2
- package/dist/scriptures.mjs +210 -94
- package/package.json +19 -18
package/dist/scriptures.d.ts
CHANGED
|
@@ -26,13 +26,27 @@ export type DetectionCallback = (reference: string) => string;
|
|
|
26
26
|
*/
|
|
27
27
|
export type LanguageCode = 'en' | 'ko' | 'de' | 'fr' | 'swe' | 'ru' | 'jp' | 'vn' | 'tr' | 'sl' | 'eo' | null;
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Options for lookupReference
|
|
31
|
+
*/
|
|
32
|
+
export interface LookupOptions {
|
|
33
|
+
/** Language code. If not provided, uses setLanguage value or defaults to 'en' */
|
|
34
|
+
language?: LanguageCode;
|
|
35
|
+
/** Canon versification: 'lds', 'rlds', ... */
|
|
36
|
+
canon?: string;
|
|
37
|
+
/** If true, no fallback to other languages */
|
|
38
|
+
noMulti?: boolean;
|
|
39
|
+
/** The most verses one range expands to (default 1000); a longer range is cut there */
|
|
40
|
+
maxVerses?: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
29
43
|
/**
|
|
30
44
|
* Looks up a scripture reference and returns structured data
|
|
31
45
|
* @param query - The scripture reference string to parse (e.g., "John 3:16")
|
|
32
|
-
* @param
|
|
46
|
+
* @param options - A language code, or LookupOptions. If no language is given, uses setLanguage value or defaults to 'en'
|
|
33
47
|
* @returns Object containing the query, parsed reference, and verse IDs
|
|
34
48
|
*/
|
|
35
|
-
export function lookupReference(query: string,
|
|
49
|
+
export function lookupReference(query: string, options?: LanguageCode | LookupOptions): LookupResult;
|
|
36
50
|
|
|
37
51
|
/**
|
|
38
52
|
* Generates a human-readable scripture reference from verse IDs
|
|
@@ -58,6 +72,13 @@ export function setLanguage(language: LanguageCode): void;
|
|
|
58
72
|
*/
|
|
59
73
|
export function detectReferences(content: string, callback?: DetectionCallback, language?: LanguageCode): string;
|
|
60
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Converts a reference string into a scripture.guide URL slug
|
|
77
|
+
* @param ref - Reference string, e.g. "John 3:16-18"
|
|
78
|
+
* @returns URL slug, e.g. "john.3.16-18"
|
|
79
|
+
*/
|
|
80
|
+
export function toSlug(ref: string): string;
|
|
81
|
+
|
|
61
82
|
// Aliases for convenience
|
|
62
83
|
export { setLanguage as lang };
|
|
63
84
|
export { setLanguage as language };
|