hebrew-transliteration 1.2.6 → 2.0.0

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/LICENSE.md ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2022 Charles Loder
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,16 +1,20 @@
1
1
  # hebrew-transliteration
2
2
 
3
- Transliterate Unicode Hebrew text according to SBL's guidelines
3
+ A JavaScript package for transliterating Hebrew
4
4
 
5
5
  ## install
6
6
 
7
7
  ### npm
8
8
 
9
- `npm install --save hebrew-transliteration`
9
+ ```bash
10
+ npm install hebrew-transliteration
11
+ ```
10
12
 
11
13
  ### local
12
14
 
13
- Download or clone this repository.
15
+ You will need to have [node installed](https://nodejs.org/en/download/).
16
+
17
+ Download or clone this repository
14
18
 
15
19
  ```bash
16
20
  cd hebrew-transliteration
@@ -23,74 +27,291 @@ npm run build
23
27
  ```javascript
24
28
  const heb = require("hebrew-transliteration");
25
29
  const transliterate = heb.transliterate;
26
-
27
- transliterate("אֱלֹהִים") >>> "ʾĕlōhîm";
30
+ transliterate("אֱלֹהִים");
31
+ // ʾĕlōhîm
28
32
  ```
29
33
 
30
34
  ## DOCS
31
35
 
32
- ### transliterate
36
+ ### About
37
+
38
+ This is a JavaScript package for transliterating Hebrew.
39
+
40
+ It exports 3 [functions](#functions):
41
+
42
+ 1. [`transliterate()`](#transliterate) — the main function which transliterates Hebrew
43
+ 2. [`remove()`](#remove) — removes taamim and optionally removes certain niqqudim
44
+ 3. [`sequence()`](#sequence) — sequences Hebrew characters according to the [SBL Hebrew Font Manual](https://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf)
45
+
46
+ And it exports 2 [classes](#classes):
47
+
48
+ 1. [`Text`](#text) — the [`Text`](https://charlesloder.github.io/havarot/classes/text.Text.html) class from the `havarotjs` package
49
+ 2. [`Schema`](#schema) — a schema for transliterating Hebrew
50
+
51
+ ### Functions
52
+
53
+ #### `transliterate()`
54
+
55
+ Takes a `string` or [`Text`](#text), and optionally a [`Schema`](#schema) or `Partial<Schema>`
33
56
 
34
57
  ```javascript
35
- heb.transliterate(text, { isSequenced: true, qametsQatan: false, isSimple: false });
58
+ heb.transliterate("אֱלֹהִים");
59
+ // "ʾĕlōhîm";
36
60
  ```
37
61
 
38
- Takes `text` \<\<String\>\> and `[options]` \<\<Object\>\>.
62
+ If no [`Schema`](#schema) is passed, then the package defaults to SBL's academic style.
63
+
64
+ You can pass in a `Partial<Schema>` that will modify SBL's academic style:
65
+
66
+ ```javascript
67
+ heb.transliterate("שָׁלוֹם", { SHIN: "sh" });
68
+ // shālôm
69
+ ```
70
+
71
+ If you need a fully customized transliteration, it is best to use the [`Schema`](#schema) constructor:
39
72
 
40
73
  ```javascript
41
- heb.transliterate("כָּל־הָעָם") >>> "kāl-hāʿām";
74
+ const schema = new heb.Schema({
75
+ ALEF: "'",
76
+ BET: "B",
77
+ ...
78
+ QAMETS: "A",
79
+ ...
80
+ }) // truncated for brevity
81
+
82
+ heb.transliterate("אָ֣ב", schema)
83
+ // 'AB
84
+ ```
42
85
 
43
- heb.transliterate("כָּל־הָעָם", { qametsQatan: true }) >>> "kol-hāʿām";
86
+ ---
87
+
88
+ #### `remove()`
89
+
90
+ Takes `string` and options. The default only removes taamim (i.e., accent or cantillation) marks.
91
+
92
+ ```javascript
93
+ heb.remove("שָׂרַ֣י אִשְׁתְּךָ֔");
94
+ // "שָׂרַי אִשְׁתְּךָ";
44
95
 
45
- heb.transliterate("שָׁלֹום") >>> "šālôm";
96
+ heb.remove("שָׂרַ֣י אִשְׁתְּךָ֔", { removeVowels: true });
97
+ // "שׂרי אשׁתך";
46
98
 
47
- heb.transliterate("שָׁלֹום", { isSimple: true }) >>> "shalom";
99
+ heb.remove("שָׂרַ֣י אִשְׁתְּךָ֔", { removeVowels: true, removeShinDot: true, removeSinDot: true });
100
+ // "שרי אשתך";
48
101
  ```
49
102
 
50
103
  ---
51
104
 
52
- ### remove
105
+ #### `sequence()`
106
+
107
+ Takes a `string`. Returns a string of properly sequenced characters according to the [SBL Hebrew Font manual](https://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf) following the pattern of: consonant - dagesh - vowel - ta'am
53
108
 
54
109
  ```javascript
55
- heb.remove(text, { removeVowels: false });
110
+ heb.sequence("\u{5D1}\u{5B0}\u{5BC}\u{5E8}\u{5B5}\u{5D0}\u{5E9}\u{5B4}\u{5C1}\u{596}\u{5D9}\u{5EA}");
111
+ // "\u{5D1}\u{5BC}\u{5B0}\u{5E8}\u{5B5}\u{5D0}\u{5E9}\u{5C1}\u{5B4}\u{596}\u{5D9}\u{5EA}"
56
112
  ```
57
113
 
58
- Takes `text` \<\<String\>\> and `[options]` \<\<Object\>\>. With `{removeVowels: false}`, will only remove cantillation (i.e., accent) marks.
114
+ ### Classes
115
+
116
+ #### Text
117
+
118
+ The [`Text`](https://charlesloder.github.io/havarot/classes/text.Text.html) class from the [`havarotjs`](https://www.npmjs.com/package/havarotjs) package.
119
+
120
+ This class is used by [`transliterate()`](#transliterate) internally to syllabify Hebrew text, but it is exposed as well.
59
121
 
60
122
  ```javascript
61
- heb.remove("כָּל־הָעָם", { removeVowels: true }) >>> "כל־העם";
123
+ const text = new heb.Text("הֲבָרֹות");
124
+ text.syllables;
125
+ // [
126
+ // Syllable { original: "הֲ" },
127
+ // Syllable { original: "בָ" },
128
+ // Syllable { original: "רֹות" }
129
+ // ]
62
130
  ```
63
131
 
64
- ---
132
+ If a `Text` is passed into [`transliterate()`](#transliterate) instead of a `string`, then the syllabification from the `Text` class is used.
133
+ If a `string` is passed in, then syllabification come from the options passed into the [`Schema`](#schema).
134
+ See more under [syllabification](#syllabification).
135
+
136
+ #### Schema
65
137
 
66
- ### sequence
138
+ A `Schema` is used to define a schema for transliteration. See the [`Schema` source](src/schema.ts) for all available properties.
139
+
140
+ The `Schema` can be divided into a few categories.
141
+
142
+ ##### 1) Syllabification
143
+
144
+ The options used for syllabifying Hebrew text can be found [here](https://charlesloder.github.io/havarot/interfaces/text.SylOpts.html)
145
+
146
+ ###### Differences between `Text` and `Schema`
147
+
148
+ There are 5 options for syllabification that are the [same as the ones used by the `Text`](https://charlesloder.github.io/havarot/interfaces/text.SylOpts.html) class. The only `Text` syllabification option that `Schema` does not use is `schema` (yes, that's confusing):
67
149
 
68
150
  ```javascript
69
- heb.sequence(text);
151
+ const text = new heb.Text("חׇכְמָ֣ה", { schema: "traditional" }); // this is okay
152
+ const schema = new heb.Schema({ schema: "traditional" }); // this does nothing
70
153
  ```
71
154
 
72
- Takes `text` \<\<String\>\>. Returns a string of properly sequenced characters according to the [SBL Hebrew Font manual](https://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf).
155
+ Read more about the syllabification options for the [`Text`](https://charlesloder.github.io/havarot/interfaces/text.SylOpts.html) and a [higher level overview](https://charlesloder.github.io/havarot/pages/Linguistic/syllabification.html)
156
+
157
+ ###### Precedence of `Text` over `Schema`
158
+
159
+ The syllabification options set by `Schema` are used if a `string` is passed into [`transliterate()`](#transliterate). If a `Text` is passed into [`transliterate()`](#transliterate) instead of a `string`, then the syllabification from the `Text` class is used:
73
160
 
74
161
  ```javascript
75
- heb.sequence("\u{5D1}\u{5B0}\u{5BC}\u{5E8}\u{5B5}\u{5D0}\u{5E9}\u{5B4}\u{5C1}\u{596}\u{5D9}\u{5EA}") >>>
76
- "\u{5D1}\u{5BC}\u{5B0}\u{5E8}\u{5B5}\u{5D0}\u{5E9}\u{5C1}\u{5B4}\u{596}\u{5D9}\u{5EA}";
162
+ // using default
163
+ heb.transliterate("חָכְמָ֣ה"); // ḥokmâ
164
+
165
+ // using Schema for syllabification
166
+ heb.transliterate("חָכְמָ֣ה", { qametsQatan: false }); // ḥākǝmâ
167
+
168
+ // using Text for syllabification
169
+ heb.transliterate(new heb.Text("חָכְמָ֣ה", { qametsQatan: false })); // ḥākǝmâ
170
+
171
+ // using Schema and Text — Text takes precedence
172
+ heb.transliterate(new heb.Text("חָכְמָ֣ה", { qametsQatan: true }), { qametsQatan: false }); // ḥokmâ
77
173
  ```
78
174
 
79
- ## License
175
+ **Note**: `qametsQatan` only converts a regular _qamets_ character; if a [_qamets qatan_ character](https://www.compart.com/en/unicode/U+05C7) is used, it will always be a _qamets qatan_.
80
176
 
81
- MIT
177
+ ##### 2) Characters
82
178
 
83
- ## Live
179
+ Most `Schema` properties are for defining single Hebrew characters:
84
180
 
85
- Use it live at [charlesLoder.github.io/hebrewTransliteration](https://charlesloder.github.io/hebrewTransliteration/index.html)
181
+ ```javascript
182
+ heb.transliterate("אָ", { ALEF: "@", QAMETS: "A" });
183
+ // @A
184
+ ```
185
+
186
+ ##### 3) Orthographic Features
187
+
188
+ Some properties are for defining common Hebrew orthographies for:
189
+
190
+ ###### _BeGaDKePhaT_
86
191
 
87
- ## Changelog
192
+ There are properties for the digraphs of _BeGaDKePhaT_ letters:
88
193
 
89
- - v1.1.0: in `transliterate()` the `options` was changed from the misspelled `isSeqeunced` to `isSequenced`.
90
- - v1.2.0:
91
- - rewrote in in TypeScript
92
- - added `isSimple` option to `transliterate()` for SBL's General Purpose Style
194
+ - `BET_DAGESH`
195
+ - `GIMEL_DAGESH`
196
+ - `DALET_DAGESH`
197
+ - `KAF_DAGESH`
198
+ - `PE_DAGESH`
199
+ - `TAV_DAGESH`
200
+
201
+ Each one is the consonant character followed by the _dagesh_ character (U+05BC).
202
+
203
+ These are helpful for distinguishing between spirantized forms.
204
+
205
+ ```javascript
206
+ heb.transliterate("בְּבֵית", { BET: "b" });
207
+ // bǝbêt
208
+
209
+ heb.transliterate("בְּבֵית", { BET: "v", BET_DAGESH: "b" });
210
+ // bǝvêt
211
+ ```
212
+
213
+ ###### Matres Lectionis
214
+
215
+ The following properties are for _matres lectionis_:
216
+
217
+ - `HIRIQ_YOD`
218
+ - `TSERE_YOD`
219
+ - `SEGOL_YOD`
220
+ - `SHUREQ`
221
+ - `HOLAM_VAV`
222
+ - `QAMATS_HE`
223
+ - `SEGOL_HE`
224
+ - `TSERE_HE`
225
+
226
+ ```javascript
227
+ heb.transliterate("פֶּה", { SEGOL_HE: "é" });
228
+ // pé
229
+ ```
230
+
231
+ ###### Others
232
+
233
+ There are other orthographic features:
234
+
235
+ - `MS_SUFX` — HEBREW LETTER QAMATS (U+05B8) and YOD (U+05D9) and VAV (U+05D5) יו◌ָ
236
+ - `DIVINE_NAME` — the full form of the divine name - יהוה
237
+ - `SYLLABLE_SEPARATOR` — a syllable separator, usually an empty string
238
+ - `DAGESH_CHAZAQ` — if true, repeats the consonant with the _dagesh_
239
+
240
+ ```javascript
241
+ heb.transliterate("שַׁבָּת", { DAGESH_CHAZAQ: true });
242
+ // šabbāt
243
+
244
+ heb.transliterate("שַׁבָּת", { DAGESH_CHAZAQ: false });
245
+ // šabāt
246
+
247
+ heb.transliterate("הָאָֽרֶץ", { SYLLABLE_SEPARATOR: "-" });
248
+ // hā-ʾā-reṣ
249
+ ```
250
+
251
+ ##### 4) Others
252
+
253
+ ###### Additional Features
254
+
255
+ The `ADDITIONAL_FEATURES` property is for defining non-typical Hebrew orthography, example:
256
+
257
+ ```javascript
258
+ heb.transliterate("הַזֹּאת", {
259
+ ADDITIONAL_FEATURES: [
260
+ {
261
+ FEATURE: "cluster",
262
+ HEBREW: "זּ",
263
+ TRANSLITERATION: "tz"
264
+ }
265
+ ]
266
+ });
267
+ // hatzōʾt
268
+ ```
269
+
270
+ - The orthography `זּ` is most often a doubling of the `ZAYIN` (i.e. `'z'` with no _dagesh_, and `'zz'` with a _dagesh chazaq_)
271
+ - In the Romaniote reading tradition, however, the `ZAYIN` is usually transliterated with `'z'` (really `'ζ'`),
272
+ - but a `ZAYIN` followed by a _dagesh_ is transliterated as `'tz'` (really `'τζ'`)
273
+
274
+ Each additional feature consists of 3 parts:
275
+
276
+ 1. `FEATURE` — has three options:
277
+ - `"cluster"` — a `cluster` is any combination of a single character and optionally a *dagesh* and vowel.
278
+ - `"syllable"` — a `syllable` is any combination of a multiple characters and a single vowel and optionally a *dagesh*
279
+ - `"word"` — covers everything else
280
+ 2. `HEBREW` — the Hebrew text to be transliterated
281
+ 3. `TRANSLITERATION` — the text used to transliterate the Hebrew text
282
+
283
+ :warning: this is an experimental property; results may not always meet expectations
284
+
285
+ ###### Stress Marker
286
+
287
+ The `STRESS_MARKER` property is an optional mark to indicate stress in transliteration.
288
+
289
+ ```javascript
290
+ heb.transliterate("מֶ֣לֶךְ", { STRESS_MARKER: { location: "after-vowel", mark: "\u0301" } });
291
+ // mélek
292
+ ```
293
+
294
+ The `location` has four options:
295
+
296
+ - `"before-syllable"`
297
+ - `"after-syllable"`
298
+ - `"before-vowel"`
299
+ - `"after-vowel"`
300
+
301
+ A combining mark (e.g. `"\u0301"`) placed `"after-vowel"` will print on top of the vowel, and placed after a digraph will print on the second vowel.
302
+
303
+ ```javascript
304
+ heb.transliterate("בֵּ֣ית", {
305
+ TSERE_YOD: "ei",
306
+ STRESS_MARKER: { location: "after-vowel", mark: "\u0301" }
307
+ });
308
+ // beít
309
+ ```
310
+
311
+ ## Live
312
+
313
+ Use it live at [charlesLoder.github.io/hebrewTransliteration](https://charlesloder.github.io/hebrewTransliteration/index.html)
93
314
 
94
315
  ## Contributing
95
316
 
96
- Please feel free to Fork, create Pull Requests, or submit issues. This is my first npm package, so any feedback is appreciated!
317
+ See [contributing](./CONTRIBUTING.md)
@@ -1,2 +1,6 @@
1
- import { Dict } from "./interfaces";
2
- export declare const transliterateMap: Dict;
1
+ import { Schema } from "./schema";
2
+ interface map {
3
+ [k: string]: keyof Schema;
4
+ }
5
+ export declare const transliterateMap: map;
6
+ export {};
@@ -3,52 +3,55 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.transliterateMap = void 0;
4
4
  exports.transliterateMap = {
5
5
  // niqqud
6
- "\u05B0": "ǝ",
7
- "\u05B1": "ĕ",
8
- "\u05B2": "ă",
9
- "\u05B3": "ŏ",
10
- "\u05B4": "i",
11
- "\u05B5": "ē",
12
- "\u05B6": "e",
13
- "\u05B7": "a",
14
- "\u05B8": "ā",
15
- "\u05B9": "ō",
16
- "\u05BA": "ō",
17
- "\u05BB": "u",
18
- // "\u{05BC}": "", // HEBREW POINT DAGESH OR MAPIQ (U+05BC)
6
+ "\u{05B0}": "VOCAL_SHEVA",
7
+ "\u{05B1}": "HATAF_SEGOL",
8
+ "\u{05B2}": "HATAF_PATAH",
9
+ "\u{05B3}": "HATAF_QAMATS",
10
+ "\u{05B4}": "HIRIQ",
11
+ "\u{05B5}": "TSERE",
12
+ "\u{05B6}": "SEGOL",
13
+ "\u{05B7}": "PATAH",
14
+ "\u{05B8}": "QAMATS",
15
+ "\u{05B9}": "HOLAM",
16
+ "\u{05BA}": "HOLAM",
17
+ "\u{05BB}": "QUBUTS",
18
+ "\u{05BC}": "DAGESH",
19
19
  // "\u{05BD}": "", // HEBREW POINT METEG (U+05BD)
20
- "\u05BE": "-",
21
- "\u05C7": "ο",
20
+ "\u{05BE}": "MAQAF",
21
+ "\u{05C0}": "PASEQ",
22
+ "\u{05C3}": "SOF_PASUQ",
23
+ "\u{05C7}": "QAMATS_QATAN",
22
24
  // consonants
23
- א: "ʾ",
24
- ב: "b",
25
- ג: "g",
26
- ד: "d",
27
- ה: "h",
28
- ו: "w",
29
- ז: "z",
30
- ח: "",
31
- ט: "",
32
- י: "y",
33
- ך: "k",
34
- כ: "k",
35
- ל: "l",
36
- ם: "m",
37
- מ: "m",
38
- ן: "n",
39
- נ: "n",
40
- ס: "s",
41
- ע: "ʿ",
42
- ף: "p",
43
- פ: "p",
44
- ץ: "",
45
- צ: "",
46
- ק: "q",
47
- ר: "r",
48
- ש: "š",
49
- ת: "t",
50
- "\u05EF": "",
51
- װ: "",
52
- ױ: "",
53
- ײ: "" // HEBREW LIGATURE YIDDISH DOUBLE YOD (U+05F2)
25
+ א: "ALEF",
26
+ ב: "BET",
27
+ ג: "GIMEL",
28
+ ד: "DALET",
29
+ ה: "HE",
30
+ ו: "VAV",
31
+ ז: "ZAYIN",
32
+ ח: "HET",
33
+ ט: "TET",
34
+ י: "YOD",
35
+ ך: "FINAL_KAF",
36
+ כ: "KAF",
37
+ ל: "LAMED",
38
+ ם: "FINAL_MEM",
39
+ מ: "MEM",
40
+ ן: "FINAL_NUN",
41
+ נ: "NUN",
42
+ ס: "SAMEKH",
43
+ ע: "AYIN",
44
+ ף: "FINAL_PE",
45
+ פ: "PE",
46
+ ץ: "FINAL_TSADI",
47
+ צ: "TSADI",
48
+ ק: "QOF",
49
+ ר: "RESH",
50
+ ש: "SHIN",
51
+ ת: "TAV" // HEBREW LETTER TAV (U+05EA)
52
+ // "\u{05EF}": "", // HEBREW YOD TRIANGLE (U+05EF)
53
+ // װ: "", // HEBREW LIGATURE YIDDISH DOUBLE VAV (U+05F0)
54
+ // ױ: "", // HEBREW LIGATURE YIDDISH VAV YOD (U+05F1)
55
+ // ײ: "" // HEBREW LIGATURE YIDDISH DOUBLE YOD (U+05F2)
54
56
  };
57
+ //# sourceMappingURL=hebCharsTrans.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hebCharsTrans.js","sourceRoot":"","sources":["../src/hebCharsTrans.ts"],"names":[],"mappings":";;;AAMa,QAAA,gBAAgB,GAAQ;IACnC,WAAW;IACX,UAAU,EAAE,aAAa;IACzB,UAAU,EAAE,aAAa;IACzB,UAAU,EAAE,aAAa;IACzB,UAAU,EAAE,cAAc;IAC1B,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,QAAQ;IACpB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,QAAQ;IACpB,UAAU,EAAE,QAAQ;IACpB,kDAAkD;IAClD,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,WAAW;IACvB,UAAU,EAAE,cAAc;IAC1B,eAAe;IACf,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,aAAa;IAChB,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,KAAK,CAAC,6BAA6B;IACtC,kDAAkD;IAClD,wDAAwD;IACxD,qDAAqD;IACrD,uDAAuD;CACxD,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- import { TransOptions, RemoveOptions } from "./interfaces";
2
- export declare const transliterate: (text: string, { isSequenced, qametsQatan, isSimple }?: TransOptions) => string;
3
- export declare const remove: (text: string, { removeVowels }?: RemoveOptions) => string;
4
- export declare const sequence: (text: string) => string;
1
+ import { Text } from "havarotjs";
2
+ import { transliterate } from "./transliterate";
3
+ import { sequence } from "./sequence";
4
+ import { remove } from "./remove";
5
+ import { Schema } from "./schema";
6
+ export { remove, Schema, sequence, Text, transliterate };
package/dist/index.js CHANGED
@@ -1,22 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sequence = exports.remove = exports.transliterate = void 0;
4
- var transliterate_1 = require("./transliterate");
5
- var sequence_1 = require("./sequence");
6
- var remove_1 = require("./remove");
7
- exports.transliterate = function (text, _a) {
8
- var _b = _a === void 0 ? {} : _a, _c = _b.isSequenced, isSequenced = _c === void 0 ? true : _c, _d = _b.qametsQatan, qametsQatan = _d === void 0 ? false : _d, _e = _b.isSimple, isSimple = _e === void 0 ? false : _e;
9
- var normalized = text.normalize("NFKD");
10
- return transliterate_1.Transliterate(normalized, { isSequenced: isSequenced, qametsQatan: qametsQatan, isSimple: isSimple });
11
- };
12
- exports.remove = function (text, _a) {
13
- var _b = (_a === void 0 ? {} : _a).removeVowels, removeVowels = _b === void 0 ? false : _b;
14
- var normalized = text.normalize("NFKD");
15
- var removed = remove_1.Remove(normalized, { removeVowels: removeVowels });
16
- var noMetheg = removed.replace(/\u{05BD}/gu, "");
17
- return noMetheg;
18
- };
19
- exports.sequence = function (text) {
20
- var normalized = text.normalize("NFKD");
21
- return sequence_1.Sequence(normalized);
22
- };
3
+ exports.transliterate = exports.Text = exports.sequence = exports.Schema = exports.remove = void 0;
4
+ const havarotjs_1 = require("havarotjs");
5
+ Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return havarotjs_1.Text; } });
6
+ const transliterate_1 = require("./transliterate");
7
+ Object.defineProperty(exports, "transliterate", { enumerable: true, get: function () { return transliterate_1.transliterate; } });
8
+ const sequence_1 = require("./sequence");
9
+ Object.defineProperty(exports, "sequence", { enumerable: true, get: function () { return sequence_1.sequence; } });
10
+ const remove_1 = require("./remove");
11
+ Object.defineProperty(exports, "remove", { enumerable: true, get: function () { return remove_1.remove; } });
12
+ const schema_1 = require("./schema");
13
+ Object.defineProperty(exports, "Schema", { enumerable: true, get: function () { return schema_1.Schema; } });
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAAiC;AAME,qFAN1B,gBAAI,OAM0B;AALvC,mDAAgD;AAKP,8FALhC,6BAAa,OAKgC;AAJtD,yCAAsC;AAIb,yFAJhB,mBAAQ,OAIgB;AAHjC,qCAAkC;AAGzB,uFAHA,eAAM,OAGA;AAFf,qCAAkC;AAEjB,uFAFR,eAAM,OAEQ"}