tibetan-mantra-to-iast-and-phonetics 0.1.2 → 0.1.4

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/src/tests.js CHANGED
@@ -4,23 +4,37 @@ export { TibetanMantraToIastAndPhonetics };
4
4
 
5
5
  export const testGroups = [
6
6
  {
7
- name: "All mantras from Mipham Rinpoché's Le Drip Gyü Chö - Sanskrit transliteration",
7
+ name: "All mantras from Mipham Rinpoché's Le Drip Gyü Chö - Sanskrit transliteration (default ṃ)",
8
8
  sentences: true,
9
9
  phonetics: false,
10
10
  tests: [
11
- { tibetan: "ཨོཾ་ཨཱཿཧཱུྃ།", result: "oṁ āḥ hūṁ" },
12
- { tibetan: "ཨོཾ་ཨཱཿཧཱུྃ་སྭཱ་ཧཱ།", result: "oṁ āḥ hūṁ svāhā" },
13
- { tibetan: "ཨོཾ་ཧཱུྃ་ཏྲཱཾ་ཧྲཱིཿཨཱཿ", result: "oṁ hūṁ trāṁ hrīḥ āḥ" },
11
+ { tibetan: "ཨོཾ་ཨཱཿཧཱུྃ།", result: "oṃ āḥ hūṃ" },
12
+ { tibetan: "ཨོཾ་ཨཱཿཧཱུྃ་སྭཱ་ཧཱ།", result: "oṃ āḥ hūṃ svāhā" },
13
+ { tibetan: "ཨོཾ་ཧཱུྃ་ཏྲཱཾ་ཧྲཱིཿཨཱཿ", result: "oṃ hūṃ trāṃ hrīḥ āḥ" },
14
14
  { tibetan: "འཿཨཿཧཿཤཿསཿམཿ", result: "āḥ aḥ haḥ śaḥ saḥ maḥ" },
15
- { tibetan: "ཨོཾ་བཛྲ་སཏྭ་ཧཱུྃ།", result: "oṁ vajra satva hūṁ" },
15
+ { tibetan: "ཨོཾ་བཛྲ་སཏྭ་ཧཱུྃ།", result: "oṃ vajra satva hūṃ" },
16
16
  {
17
17
  tibetan: "ན་མཿས་མནྟ་བུདྡྷཱ་ནཱཾ། ཨཱ་བཱི་ར་ཧཱུྃ་ཁཾ།",
18
- result: "namaḥ samanta buddhānāṁ āvīra hūṁ khaṁ",
18
+ result: "namaḥ samanta buddhānāṃ āvīra hūṃ khaṃ",
19
19
  },
20
- { tibetan: "ཨོཾ་མ་ཎི་པདྨེ་ཧཱུྃ།", result: "oṁ maṇi padmé hūṁ" },
20
+ { tibetan: "ཨོཾ་མ་ཎི་པདྨེ་ཧཱུྃ།", result: "oṃ maṇi padmé hūṃ" },
21
21
  {
22
22
  tibetan: "ཨོཾ་ཏཱ་རེ་ཏུཏྟཱ་རེ་ཏུ་རེ་སྭཱ་ཧཱ།",
23
- result: "oṁ tāré tuttāré turé svāhā",
23
+ result: "oṃ tāré tuttāré turé svāhā",
24
+ },
25
+ ],
26
+ },
27
+ {
28
+ name: "Anusvara style ṁ option",
29
+ sentences: true,
30
+ phonetics: false,
31
+ anusvaraStyle: "ṁ",
32
+ tests: [
33
+ { tibetan: "ཨོཾ་ཨཱཿཧཱུྃ།", result: "oṁ āḥ hūṁ" },
34
+ { tibetan: "ཨོཾ་མ་ཎི་པདྨེ་ཧཱུྃ།", result: "oṁ maṇi padmé hūṁ" },
35
+ {
36
+ tibetan: "ན་མཿས་མནྟ་བུདྡྷཱ་ནཱཾ། ཨཱ་བཱི་ར་ཧཱུྃ་ཁཾ།",
37
+ result: "namaḥ samanta buddhānāṁ āvīra hūṁ khaṁ",
24
38
  },
25
39
  ],
26
40
  },
@@ -40,7 +54,10 @@ export function runTests() {
40
54
  const groupResults = {
41
55
  name: group.name,
42
56
  tests: group.tests.map((test) => {
43
- const options = { mode: group.phonetics ? "phonetics" : "iast" };
57
+ const options = {
58
+ mode: group.phonetics ? "phonetics" : "iast",
59
+ anusvaraStyle: group.anusvaraStyle,
60
+ };
44
61
  const transliterated = new TibetanMantraToIastAndPhonetics(
45
62
  test.tibetan
46
63
  ).transliterate(options);