lipilekhika 1.0.12 → 1.0.13
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 +15 -8
- package/dist/cjs/bind-Xz3jDi6F.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index_main-B4q78hpT.cjs +1 -0
- package/dist/cjs/lang_list-CDBtndhz.cjs +1 -0
- package/dist/cjs/node.cjs +1 -1
- package/dist/cjs/script_normalization-BsuDeGQy.cjs +2 -0
- package/dist/cjs/typing.cjs +1 -1
- package/dist/esm/bind-LUIP9_qv.js +233 -0
- package/dist/esm/index.mjs +11 -10
- package/dist/esm/index_main-BnhtsCFC.js +28 -0
- package/dist/esm/lang_list-Bznh0vyX.js +65 -0
- package/dist/esm/node.mjs +4 -2
- package/dist/esm/{script_normalization-21qKy-qC.js → script_normalization-5rlQdSTp.js} +186 -245
- package/dist/esm/typing.mjs +9 -9
- package/dist/index.d.ts +12 -6
- package/dist/lipilekhika.umd.js +2 -2
- package/dist/native/index.android-arm64.node +0 -0
- package/dist/native/index.darwin-arm64.node +0 -0
- package/dist/native/index.darwin-x64.node +0 -0
- package/dist/native/index.linux-arm64-gnu.node +0 -0
- package/dist/native/index.linux-arm64-musl.node +0 -0
- package/dist/native/index.linux-x64-gnu.node +0 -0
- package/dist/native/index.linux-x64-musl.node +0 -0
- package/dist/native/index.win32-arm64-msvc.node +0 -0
- package/dist/native/index.win32-x64-msvc.node +0 -0
- package/dist/node.d.ts +9 -3
- package/package.json +2 -2
- package/dist/cjs/bind-Bce-QxQb.cjs +0 -1
- package/dist/cjs/index_main-B4cHiizs.cjs +0 -1
- package/dist/cjs/script_normalization-DL3qU-m7.cjs +0 -2
- package/dist/esm/bind-DSfUu3Zz.js +0 -150
- package/dist/esm/index_main-CW_Y3FZr.js +0 -28
- /package/dist/cjs/{Assamese-Qh4xUhYt.cjs → Assamese-CZWjOyT7.cjs} +0 -0
- /package/dist/cjs/{Bengali-vHC_WItd.cjs → Bengali-D1Du8Nw6.cjs} +0 -0
- /package/dist/cjs/{Brahmi-CZuqKBsh.cjs → Brahmi-D9g4cMha.cjs} +0 -0
- /package/dist/cjs/{Devanagari-B9bjff2a.cjs → Devanagari-ByNHoQE2.cjs} +0 -0
- /package/dist/cjs/{Granth-CumoFnwM.cjs → Granth-IUo-D2qH.cjs} +0 -0
- /package/dist/cjs/{Gujarati-DLh0Oq9b.cjs → Gujarati-nSBayjFi.cjs} +0 -0
- /package/dist/cjs/{Gurumukhi-BQnl9N81.cjs → Gurumukhi-DMH4zFHZ.cjs} +0 -0
- /package/dist/cjs/{Kannada-BbcHjslQ.cjs → Kannada-B0bkw2yz.cjs} +0 -0
- /package/dist/cjs/{Malayalam-CvfqhNXF.cjs → Malayalam-CfTR8psv.cjs} +0 -0
- /package/dist/cjs/{Modi-CyX1YgNG.cjs → Modi-CkE4APge.cjs} +0 -0
- /package/dist/cjs/{Normal-Dy6uxpD8.cjs → Normal-oM4Dcfhj.cjs} +0 -0
- /package/dist/cjs/{Odia-vejSGaJG.cjs → Odia-N-NEr4Dq.cjs} +0 -0
- /package/dist/cjs/{Purna-Devanagari-BhxjJLWk.cjs → Purna-Devanagari-CfVZXlu5.cjs} +0 -0
- /package/dist/cjs/{Romanized-lJIjjSAU.cjs → Romanized-DnfpoSJ6.cjs} +0 -0
- /package/dist/cjs/{Sharada-6pAFHd88.cjs → Sharada-O3j2SM2p.cjs} +0 -0
- /package/dist/cjs/{Siddham-Clv01Ail.cjs → Siddham-COibu26v.cjs} +0 -0
- /package/dist/cjs/{Sinhala-lK31uiNZ.cjs → Sinhala-msPlb_U1.cjs} +0 -0
- /package/dist/cjs/{Tamil-SZsS44OY.cjs → Tamil-DEdNLfd6.cjs} +0 -0
- /package/dist/cjs/{Tamil-Extended-ZF4vwUl-.cjs → Tamil-Extended-I3YvGvAu.cjs} +0 -0
- /package/dist/cjs/{Telugu-D4oKpFDE.cjs → Telugu-BALh-oXW.cjs} +0 -0
- /package/dist/esm/{Assamese-BOUXlcuF.js → Assamese-CnQUnOuw.js} +0 -0
- /package/dist/esm/{Bengali-vBb7fGOX.js → Bengali-ios4gobv.js} +0 -0
- /package/dist/esm/{Brahmi-DhPmHFWi.js → Brahmi-D2KTqRXs.js} +0 -0
- /package/dist/esm/{Devanagari-BLc1kB2m.js → Devanagari-RjVILyvz.js} +0 -0
- /package/dist/esm/{Granth-yvXWfR_9.js → Granth-C07kCmIS.js} +0 -0
- /package/dist/esm/{Gujarati-CD84hI_u.js → Gujarati-B0VyanP_.js} +0 -0
- /package/dist/esm/{Gurumukhi-BSw7viTw.js → Gurumukhi-BoMJGpRu.js} +0 -0
- /package/dist/esm/{Kannada-C6vqMQB-.js → Kannada-jMeZbYln.js} +0 -0
- /package/dist/esm/{Malayalam-VW_kT7Lm.js → Malayalam-DZ9U7k3R.js} +0 -0
- /package/dist/esm/{Modi-D4dKXHpc.js → Modi-DyI1mJqf.js} +0 -0
- /package/dist/esm/{Normal-Bni1k1j-.js → Normal-C6tGUzPG.js} +0 -0
- /package/dist/esm/{Odia-B_18v-3A.js → Odia-QrjS2DZs.js} +0 -0
- /package/dist/esm/{Purna-Devanagari-Dayhd5L3.js → Purna-Devanagari-DidbBxob.js} +0 -0
- /package/dist/esm/{Romanized-BjbKJZkE.js → Romanized-QUiqq0a2.js} +0 -0
- /package/dist/esm/{Sharada-BKlrhp3E.js → Sharada-CcBw1Bl1.js} +0 -0
- /package/dist/esm/{Siddham-P7AcSKpF.js → Siddham-BqbzemjU.js} +0 -0
- /package/dist/esm/{Sinhala-qiPfv-0x.js → Sinhala-BtaLnnJ2.js} +0 -0
- /package/dist/esm/{Tamil-Dwp75eqV.js → Tamil-BkvKZ_tz.js} +0 -0
- /package/dist/esm/{Tamil-Extended-FSSCiP-x.js → Tamil-Extended-CR23sivR.js} +0 -0
- /package/dist/esm/{Telugu-CXroDPak.js → Telugu-D4lLDD0_.js} +0 -0
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ console.log(result); // न जायते म्रियते वा
|
|
|
59
59
|
```typescript
|
|
60
60
|
import { transliterate } from 'lipilekhika';
|
|
61
61
|
|
|
62
|
-
const result = await transliterate('
|
|
62
|
+
const result = await transliterate('गङ्गा', 'Devanagari', 'Gujarati', {
|
|
63
63
|
'brahmic_to_brahmic:replace_pancham_varga_varna_with_anusvAra': true
|
|
64
64
|
});
|
|
65
65
|
console.log(result); // ગંગા (instead of ગઙ્ગા)
|
|
@@ -76,12 +76,12 @@ console.log(result); // ગંગા (instead of ગઙ્ગા)
|
|
|
76
76
|
|
|
77
77
|
**Parameters:**
|
|
78
78
|
|
|
79
|
-
- `text: string` — Text to transliterate
|
|
79
|
+
- `text: string | string[]` — Text to transliterate (see `TransliterateInput`)
|
|
80
80
|
- `from: ScriptLangType` — Source script/language
|
|
81
81
|
- `to: ScriptLangType` — Target script/language
|
|
82
82
|
- `options?: TransliterationOptions` — Custom transliteration options
|
|
83
83
|
|
|
84
|
-
**Returns:** `Promise<string
|
|
84
|
+
**Returns:** `Promise<TransliterateOutput<T>>` — `string` when `text` is a string, `string[]` when `text` is an array
|
|
85
85
|
|
|
86
86
|
</details>
|
|
87
87
|
|
|
@@ -117,12 +117,12 @@ Read more about [WASM Module](https://lipilekhika.in/getting-started/wasm/)
|
|
|
117
117
|
|
|
118
118
|
**Parameters:**
|
|
119
119
|
|
|
120
|
-
- `text: string` — Text to transliterate
|
|
120
|
+
- `text: string | string[]` — Text to transliterate (see `TransliterateInput`)
|
|
121
121
|
- `from: ScriptLangType` — Source script/language
|
|
122
122
|
- `to: ScriptLangType` — Target script/language
|
|
123
123
|
- `options?: TransliterationOptions` — Custom transliteration options
|
|
124
124
|
|
|
125
|
-
**Returns:** `Promise<string
|
|
125
|
+
**Returns:** `Promise<TransliterateOutput<T>>` — `string` when `text` is a string, `string[]` when `text` is an array
|
|
126
126
|
|
|
127
127
|
**Note:** Uses the fast Rust-based WASM implementation for improved performance. Works in all JavaScript environments (Node.js, browsers, Deno, Bun).
|
|
128
128
|
|
|
@@ -142,9 +142,9 @@ Read more about [WASM Module](https://lipilekhika.in/getting-started/wasm/)
|
|
|
142
142
|
|
|
143
143
|
Available via `lipilekhika/node`. Uses a native Rust N-API binding for near-native performance. Only works in **Node.js, Bun, and Deno** on **Linux/macOS/Windows (x86_64 & aarch64)**.
|
|
144
144
|
|
|
145
|
-
**Parameters:** Same as `transliterate
|
|
145
|
+
**Parameters:** Same as `transliterate` (`text: string | string[]`, etc.).
|
|
146
146
|
|
|
147
|
-
**Returns:** `Promise<string
|
|
147
|
+
**Returns:** `Promise<TransliterateOutput<T>>` — `string` when `text` is a string, `string[]` when `text` is an array
|
|
148
148
|
|
|
149
149
|
</details>
|
|
150
150
|
|
|
@@ -161,7 +161,12 @@ Available via `lipilekhika/node`.
|
|
|
161
161
|
|
|
162
162
|
```typescript
|
|
163
163
|
import { SCRIPT_LIST, LANG_LIST, ALL_LANG_SCRIPT_LIST } from 'lipilekhika';
|
|
164
|
-
import type {
|
|
164
|
+
import type {
|
|
165
|
+
ScriptLangType,
|
|
166
|
+
TransliterateInput,
|
|
167
|
+
TransliterateOutput,
|
|
168
|
+
TransliterationOptions
|
|
169
|
+
} from 'lipilekhika';
|
|
165
170
|
```
|
|
166
171
|
|
|
167
172
|
| Export | Description |
|
|
@@ -170,6 +175,8 @@ import type { ScriptLangType, TransliterationOptions } from 'lipilekhika';
|
|
|
170
175
|
| `LANG_LIST` | Array of all supported language names mapped to scripts |
|
|
171
176
|
| `ALL_LANG_SCRIPT_LIST` | Combined list of all scripts and languages |
|
|
172
177
|
| `ScriptLangType` | Type for script/language identifiers (includes aliases) |
|
|
178
|
+
| `TransliterateInput` | `string | readonly string[]` accepted by transliterate APIs |
|
|
179
|
+
| `TransliterateOutput<T>` | Return type inferred from input (`string` or `string[]`) |
|
|
173
180
|
| `TransliterationOptions` | Type for custom transliteration options |
|
|
174
181
|
| `ScriptListType` | Type for the script list |
|
|
175
182
|
| `LangListType` | Type for the language list |
|