tamil-toolkit 0.1.0-alpha.1 → 0.1.0-alpha.2
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 +12 -3
- package/THIRD_PARTY_NOTICES.md +29 -0
- package/dist/api.d.ts +8 -0
- package/dist/api.js +8 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/web.d.ts +1 -1
- package/dist/web.js +1 -1
- package/package.json +1 -1
- package/pkg-node/README.md +12 -3
- package/pkg-node/package.json +1 -1
- package/pkg-node/tamil_toolkit_bg.wasm +0 -0
- package/pkg-web/README.md +12 -3
- package/pkg-web/package.json +1 -1
- package/pkg-web/tamil_toolkit_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
`just sync-bindings` produces Node and browser WASM builds and TypeScript
|
|
4
4
|
declarations. Node: `import * as tamil from 'tamil-toolkit'`. Browser:
|
|
5
5
|
`import { init, get_letters } from 'tamil-toolkit/web'; await init();`.
|
|
6
|
-
|
|
7
|
-
has occurred. Once published, install with `npm install tamil-toolkit@alpha`.
|
|
6
|
+
Install the experimental MIT-licensed alpha on npm with `npm install tamil-toolkit@alpha`.
|
|
8
7
|
These adapters serialize calls into the shared Rust dispatcher. Planned modules
|
|
9
8
|
are excluded. APIs may change before stability. Node 22+ is supported; browser
|
|
10
9
|
consumers must initialize the WASM module before calling its functions.
|
|
@@ -18,7 +17,7 @@ console.log(format_currency(102550, "LKR", "SL")); // LKR 1,025.50
|
|
|
18
17
|
|
|
19
18
|
The package includes core Unicode/Ezhuthu functions, Agara collation, bounded
|
|
20
19
|
TN/SL integer and currency words, fractions, Gregorian dates, and explicit
|
|
21
|
-
Bamini conversion. For browser code use the `/web` entry point, `await init()`,
|
|
20
|
+
Bamini and bounded TSCII, TAB, TAM and Anjal byte conversion. For browser code use the `/web` entry point, `await init()`,
|
|
22
21
|
then call the same methods. Hosts must serve the packaged WASM file with the
|
|
23
22
|
generated loader; bundlers must support WebAssembly assets and ES modules.
|
|
24
23
|
See LICENSE, THIRD_PARTY_NOTICES.md, and bundled dependency license notices.
|
|
@@ -28,3 +27,13 @@ Use the comparison result or numeric-array keys for ordering; comparing their
|
|
|
28
27
|
JSON string representation is incorrect. The versioned `agara-v1` profile and
|
|
29
28
|
its mixed-script fallback are specified at
|
|
30
29
|
https://github.com/abishtakan/tamil-toolkit/tree/HEAD/docs/specs/collate-v0.1.md.
|
|
30
|
+
|
|
31
|
+
This distribution provides `tscii_bytes_to_unicode(new Uint8Array([0xba, 0xa2, 0xc5, 0xfd]))`.
|
|
32
|
+
|
|
33
|
+
`unicode_to_tscii_bytes(text)` returns an array of byte values.
|
|
34
|
+
|
|
35
|
+
This distribution provides `tab_bytes_to_unicode(bytes)` and `unicode_to_tab_bytes(text)`.
|
|
36
|
+
|
|
37
|
+
This distribution provides `tam_bytes_to_unicode(bytes)` and `unicode_to_tam_bytes(text)`; TAM bytes do not preserve Latin letters.
|
|
38
|
+
|
|
39
|
+
This distribution provides `anjal_bytes_to_unicode(bytes)` and `unicode_to_anjal_bytes(text)`; ambiguous legacy bytes raise an error.
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -7,6 +7,7 @@ replace them. Generated lexicon copies are checked against the canonical data.
|
|
|
7
7
|
Unicode 17 and CLDR 49 data: https://www.unicode.org/ and https://cldr.unicode.org/
|
|
8
8
|
Bamini mapping sources: https://github.com/ag-sanjjeev/app-tamil-fonts-unicode-converter
|
|
9
9
|
and https://github.com/Pakeetharan/unicode-bamini-converter
|
|
10
|
+
TSCII mapping source: https://github.com/mayooresan/Android-TamilUtil
|
|
10
11
|
Exact sources, revisions, digests and profile limits are recorded at:
|
|
11
12
|
https://github.com/abishtakan/tamil-toolkit/tree/HEAD/tests/reference
|
|
12
13
|
and https://github.com/abishtakan/tamil-toolkit/tree/HEAD/docs/specs
|
|
@@ -110,3 +111,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
110
111
|
SOFTWARE.
|
|
111
112
|
```
|
|
112
113
|
|
|
114
|
+
## Jay Mayu Android TamilUtil reference (MIT)
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
The MIT License (MIT)
|
|
118
|
+
|
|
119
|
+
Copyright (c) 2016 Jay Mayu
|
|
120
|
+
|
|
121
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
122
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
123
|
+
in the Software without restriction, including without limitation the rights
|
|
124
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
125
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
126
|
+
furnished to do so, subject to the following conditions:
|
|
127
|
+
|
|
128
|
+
The above copyright notice and this permission notice shall be included in all
|
|
129
|
+
copies or substantial portions of the Software.
|
|
130
|
+
|
|
131
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
132
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
133
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
134
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
135
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
136
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
137
|
+
SOFTWARE.
|
|
138
|
+
|
|
139
|
+
Above license is for Tamil-Utill only. We do not offer fonts used in the example under the same license.
|
|
140
|
+
```
|
|
141
|
+
|
package/dist/api.d.ts
CHANGED
|
@@ -41,6 +41,14 @@ export declare function createApi(nativeExecute: (request: string) => string): {
|
|
|
41
41
|
currency_to_words: (amount_minor: number, currency: Currency, locale?: Locale) => string;
|
|
42
42
|
bamini_to_unicode: (text: string, errors?: CodecErrorPolicy) => string;
|
|
43
43
|
unicode_to_bamini: (text: string) => string;
|
|
44
|
+
anjal_bytes_to_unicode: (bytes: Uint8Array | number[]) => string;
|
|
45
|
+
unicode_to_anjal_bytes: (text: string) => number[];
|
|
46
|
+
tam_bytes_to_unicode: (bytes: Uint8Array | number[]) => string;
|
|
47
|
+
unicode_to_tam_bytes: (text: string) => number[];
|
|
48
|
+
tab_bytes_to_unicode: (bytes: Uint8Array | number[]) => string;
|
|
49
|
+
unicode_to_tab_bytes: (text: string) => number[];
|
|
50
|
+
tscii_bytes_to_unicode: (bytes: Uint8Array | number[]) => string;
|
|
51
|
+
unicode_to_tscii_bytes: (text: string) => number[];
|
|
44
52
|
format_fraction: (numerator: number, denominator: number, digits?: DigitStyle) => string;
|
|
45
53
|
fraction_to_words: (numerator: number, denominator: number, locale?: Locale) => string;
|
|
46
54
|
fraction_symbol: (numerator: number, denominator: number) => string;
|
package/dist/api.js
CHANGED
|
@@ -18,6 +18,14 @@ export function createApi(nativeExecute) {
|
|
|
18
18
|
currency_to_words: (amount_minor, currency, locale = "TN") => execute({ op: "currency_to_words", input: { amount_minor, currency, locale } }),
|
|
19
19
|
bamini_to_unicode: (text, errors = "strict") => execute({ op: "bamini_to_unicode", input: { text, errors } }),
|
|
20
20
|
unicode_to_bamini: (text) => execute({ op: "unicode_to_bamini", input: { text } }),
|
|
21
|
+
anjal_bytes_to_unicode: (bytes) => execute({ op: "anjal_bytes_to_unicode", input: { bytes: Array.from(bytes) } }),
|
|
22
|
+
unicode_to_anjal_bytes: (text) => execute({ op: "unicode_to_anjal_bytes", input: { text } }),
|
|
23
|
+
tam_bytes_to_unicode: (bytes) => execute({ op: "tam_bytes_to_unicode", input: { bytes: Array.from(bytes) } }),
|
|
24
|
+
unicode_to_tam_bytes: (text) => execute({ op: "unicode_to_tam_bytes", input: { text } }),
|
|
25
|
+
tab_bytes_to_unicode: (bytes) => execute({ op: "tab_bytes_to_unicode", input: { bytes: Array.from(bytes) } }),
|
|
26
|
+
unicode_to_tab_bytes: (text) => execute({ op: "unicode_to_tab_bytes", input: { text } }),
|
|
27
|
+
tscii_bytes_to_unicode: (bytes) => execute({ op: "tscii_bytes_to_unicode", input: { bytes: Array.from(bytes) } }),
|
|
28
|
+
unicode_to_tscii_bytes: (text) => execute({ op: "unicode_to_tscii_bytes", input: { text } }),
|
|
21
29
|
format_fraction: (numerator, denominator, digits = "latin") => execute({ op: "format_fraction", input: { numerator, denominator, digits } }),
|
|
22
30
|
fraction_to_words: (numerator, denominator, locale = "TN") => execute({ op: "fraction_to_words", input: { numerator, denominator, locale } }),
|
|
23
31
|
fraction_symbol: (numerator, denominator) => execute({ op: "fraction_symbol", input: { numerator, denominator } }),
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type { Uyirmei, Request, Inspection, Locale, Currency, CodecErrorPolicy, DigitStyle, DateStyle } from "./api.js";
|
|
2
|
-
export declare const execute: (request: import("./api.js").Request) => unknown, get_letters: (text: string) => string[], normalize_nfc: (text: string) => string, normalize_nfd: (text: string) => string, split_uyirmei: (text: string) => import("./api.js").Uyirmei, compose_uyirmei: (mei: string, uyir: string) => string, inspect_tamil_string: (text: string) => import("./api.js").Inspection, compare: (left: string, right: string) => -1 | 0 | 1, sort_words: (words: string[]) => string[], sort_key: (text: string) => number[], search_key: (text: string) => number[], to_words: (value: number, locale?: import("./api.js").Locale) => string, format_currency: (amount_minor: number, currency: import("./api.js").Currency, locale?: import("./api.js").Locale) => string, currency_to_words: (amount_minor: number, currency: import("./api.js").Currency, locale?: import("./api.js").Locale) => string, bamini_to_unicode: (text: string, errors?: import("./api.js").CodecErrorPolicy) => string, unicode_to_bamini: (text: string) => string, format_fraction: (numerator: number, denominator: number, digits?: import("./api.js").DigitStyle) => string, fraction_to_words: (numerator: number, denominator: number, locale?: import("./api.js").Locale) => string, fraction_symbol: (numerator: number, denominator: number) => string, format_date: (year: number, month: number, day: number, locale?: import("./api.js").Locale, style?: import("./api.js").DateStyle, digits?: import("./api.js").DigitStyle) => string;
|
|
2
|
+
export declare const execute: (request: import("./api.js").Request) => unknown, get_letters: (text: string) => string[], normalize_nfc: (text: string) => string, normalize_nfd: (text: string) => string, split_uyirmei: (text: string) => import("./api.js").Uyirmei, compose_uyirmei: (mei: string, uyir: string) => string, inspect_tamil_string: (text: string) => import("./api.js").Inspection, compare: (left: string, right: string) => -1 | 0 | 1, sort_words: (words: string[]) => string[], sort_key: (text: string) => number[], search_key: (text: string) => number[], to_words: (value: number, locale?: import("./api.js").Locale) => string, format_currency: (amount_minor: number, currency: import("./api.js").Currency, locale?: import("./api.js").Locale) => string, currency_to_words: (amount_minor: number, currency: import("./api.js").Currency, locale?: import("./api.js").Locale) => string, bamini_to_unicode: (text: string, errors?: import("./api.js").CodecErrorPolicy) => string, unicode_to_bamini: (text: string) => string, anjal_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_anjal_bytes: (text: string) => number[], tam_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_tam_bytes: (text: string) => number[], tab_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_tab_bytes: (text: string) => number[], tscii_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_tscii_bytes: (text: string) => number[], format_fraction: (numerator: number, denominator: number, digits?: import("./api.js").DigitStyle) => string, fraction_to_words: (numerator: number, denominator: number, locale?: import("./api.js").Locale) => string, fraction_symbol: (numerator: number, denominator: number) => string, format_date: (year: number, month: number, day: number, locale?: import("./api.js").Locale, style?: import("./api.js").DateStyle, digits?: import("./api.js").DigitStyle) => string;
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { execute as nativeExecute } from "../pkg-node/tamil_toolkit.js";
|
|
2
2
|
import { createApi } from "./api.js";
|
|
3
|
-
export const { execute, get_letters, normalize_nfc, normalize_nfd, split_uyirmei, compose_uyirmei, inspect_tamil_string, compare, sort_words, sort_key, search_key, to_words, format_currency, currency_to_words, bamini_to_unicode, unicode_to_bamini, format_fraction, fraction_to_words, fraction_symbol, format_date } = createApi(nativeExecute);
|
|
3
|
+
export const { execute, get_letters, normalize_nfc, normalize_nfd, split_uyirmei, compose_uyirmei, inspect_tamil_string, compare, sort_words, sort_key, search_key, to_words, format_currency, currency_to_words, bamini_to_unicode, unicode_to_bamini, anjal_bytes_to_unicode, unicode_to_anjal_bytes, tam_bytes_to_unicode, unicode_to_tam_bytes, tab_bytes_to_unicode, unicode_to_tab_bytes, tscii_bytes_to_unicode, unicode_to_tscii_bytes, format_fraction, fraction_to_words, fraction_symbol, format_date } = createApi(nativeExecute);
|
package/dist/web.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import init from "../pkg-web/tamil_toolkit.js";
|
|
2
2
|
export { init };
|
|
3
3
|
export type { Uyirmei, Request, Inspection, Locale, Currency, CodecErrorPolicy, DigitStyle, DateStyle } from "./api.js";
|
|
4
|
-
export declare const execute: (request: import("./api.js").Request) => unknown, get_letters: (text: string) => string[], normalize_nfc: (text: string) => string, normalize_nfd: (text: string) => string, split_uyirmei: (text: string) => import("./api.js").Uyirmei, compose_uyirmei: (mei: string, uyir: string) => string, inspect_tamil_string: (text: string) => import("./api.js").Inspection, compare: (left: string, right: string) => -1 | 0 | 1, sort_words: (words: string[]) => string[], sort_key: (text: string) => number[], search_key: (text: string) => number[], to_words: (value: number, locale?: import("./api.js").Locale) => string, format_currency: (amount_minor: number, currency: import("./api.js").Currency, locale?: import("./api.js").Locale) => string, currency_to_words: (amount_minor: number, currency: import("./api.js").Currency, locale?: import("./api.js").Locale) => string, bamini_to_unicode: (text: string, errors?: import("./api.js").CodecErrorPolicy) => string, unicode_to_bamini: (text: string) => string, format_fraction: (numerator: number, denominator: number, digits?: import("./api.js").DigitStyle) => string, fraction_to_words: (numerator: number, denominator: number, locale?: import("./api.js").Locale) => string, fraction_symbol: (numerator: number, denominator: number) => string, format_date: (year: number, month: number, day: number, locale?: import("./api.js").Locale, style?: import("./api.js").DateStyle, digits?: import("./api.js").DigitStyle) => string;
|
|
4
|
+
export declare const execute: (request: import("./api.js").Request) => unknown, get_letters: (text: string) => string[], normalize_nfc: (text: string) => string, normalize_nfd: (text: string) => string, split_uyirmei: (text: string) => import("./api.js").Uyirmei, compose_uyirmei: (mei: string, uyir: string) => string, inspect_tamil_string: (text: string) => import("./api.js").Inspection, compare: (left: string, right: string) => -1 | 0 | 1, sort_words: (words: string[]) => string[], sort_key: (text: string) => number[], search_key: (text: string) => number[], to_words: (value: number, locale?: import("./api.js").Locale) => string, format_currency: (amount_minor: number, currency: import("./api.js").Currency, locale?: import("./api.js").Locale) => string, currency_to_words: (amount_minor: number, currency: import("./api.js").Currency, locale?: import("./api.js").Locale) => string, bamini_to_unicode: (text: string, errors?: import("./api.js").CodecErrorPolicy) => string, unicode_to_bamini: (text: string) => string, anjal_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_anjal_bytes: (text: string) => number[], tam_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_tam_bytes: (text: string) => number[], tab_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_tab_bytes: (text: string) => number[], tscii_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_tscii_bytes: (text: string) => number[], format_fraction: (numerator: number, denominator: number, digits?: import("./api.js").DigitStyle) => string, fraction_to_words: (numerator: number, denominator: number, locale?: import("./api.js").Locale) => string, fraction_symbol: (numerator: number, denominator: number) => string, format_date: (year: number, month: number, day: number, locale?: import("./api.js").Locale, style?: import("./api.js").DateStyle, digits?: import("./api.js").DigitStyle) => string;
|
package/dist/web.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import init, { execute as nativeExecute } from "../pkg-web/tamil_toolkit.js";
|
|
2
2
|
import { createApi } from "./api.js";
|
|
3
3
|
export { init };
|
|
4
|
-
export const { execute, get_letters, normalize_nfc, normalize_nfd, split_uyirmei, compose_uyirmei, inspect_tamil_string, compare, sort_words, sort_key, search_key, to_words, format_currency, currency_to_words, bamini_to_unicode, unicode_to_bamini, format_fraction, fraction_to_words, fraction_symbol, format_date } = createApi(nativeExecute);
|
|
4
|
+
export const { execute, get_letters, normalize_nfc, normalize_nfd, split_uyirmei, compose_uyirmei, inspect_tamil_string, compare, sort_words, sort_key, search_key, to_words, format_currency, currency_to_words, bamini_to_unicode, unicode_to_bamini, anjal_bytes_to_unicode, unicode_to_anjal_bytes, tam_bytes_to_unicode, unicode_to_tam_bytes, tab_bytes_to_unicode, unicode_to_tab_bytes, tscii_bytes_to_unicode, unicode_to_tscii_bytes, format_fraction, fraction_to_words, fraction_symbol, format_date } = createApi(nativeExecute);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamil-toolkit",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {"type": "git", "url": "https://github.com/abishtakan/tamil-toolkit.git", "directory": "bindings/js-wasm"},
|
|
6
6
|
"homepage": "https://github.com/abishtakan/tamil-toolkit#readme",
|
package/pkg-node/README.md
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
`just sync-bindings` produces Node and browser WASM builds and TypeScript
|
|
4
4
|
declarations. Node: `import * as tamil from 'tamil-toolkit'`. Browser:
|
|
5
5
|
`import { init, get_letters } from 'tamil-toolkit/web'; await init();`.
|
|
6
|
-
|
|
7
|
-
has occurred. Once published, install with `npm install tamil-toolkit@alpha`.
|
|
6
|
+
Install the experimental MIT-licensed alpha on npm with `npm install tamil-toolkit@alpha`.
|
|
8
7
|
These adapters serialize calls into the shared Rust dispatcher. Planned modules
|
|
9
8
|
are excluded. APIs may change before stability. Node 22+ is supported; browser
|
|
10
9
|
consumers must initialize the WASM module before calling its functions.
|
|
@@ -18,7 +17,7 @@ console.log(format_currency(102550, "LKR", "SL")); // LKR 1,025.50
|
|
|
18
17
|
|
|
19
18
|
The package includes core Unicode/Ezhuthu functions, Agara collation, bounded
|
|
20
19
|
TN/SL integer and currency words, fractions, Gregorian dates, and explicit
|
|
21
|
-
Bamini conversion. For browser code use the `/web` entry point, `await init()`,
|
|
20
|
+
Bamini and bounded TSCII, TAB, TAM and Anjal byte conversion. For browser code use the `/web` entry point, `await init()`,
|
|
22
21
|
then call the same methods. Hosts must serve the packaged WASM file with the
|
|
23
22
|
generated loader; bundlers must support WebAssembly assets and ES modules.
|
|
24
23
|
See LICENSE, THIRD_PARTY_NOTICES.md, and bundled dependency license notices.
|
|
@@ -28,3 +27,13 @@ Use the comparison result or numeric-array keys for ordering; comparing their
|
|
|
28
27
|
JSON string representation is incorrect. The versioned `agara-v1` profile and
|
|
29
28
|
its mixed-script fallback are specified at
|
|
30
29
|
https://github.com/abishtakan/tamil-toolkit/tree/HEAD/docs/specs/collate-v0.1.md.
|
|
30
|
+
|
|
31
|
+
This distribution provides `tscii_bytes_to_unicode(new Uint8Array([0xba, 0xa2, 0xc5, 0xfd]))`.
|
|
32
|
+
|
|
33
|
+
`unicode_to_tscii_bytes(text)` returns an array of byte values.
|
|
34
|
+
|
|
35
|
+
This distribution provides `tab_bytes_to_unicode(bytes)` and `unicode_to_tab_bytes(text)`.
|
|
36
|
+
|
|
37
|
+
This distribution provides `tam_bytes_to_unicode(bytes)` and `unicode_to_tam_bytes(text)`; TAM bytes do not preserve Latin letters.
|
|
38
|
+
|
|
39
|
+
This distribution provides `anjal_bytes_to_unicode(bytes)` and `unicode_to_anjal_bytes(text)`; ambiguous legacy bytes raise an error.
|
package/pkg-node/package.json
CHANGED
|
Binary file
|
package/pkg-web/README.md
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
`just sync-bindings` produces Node and browser WASM builds and TypeScript
|
|
4
4
|
declarations. Node: `import * as tamil from 'tamil-toolkit'`. Browser:
|
|
5
5
|
`import { init, get_letters } from 'tamil-toolkit/web'; await init();`.
|
|
6
|
-
|
|
7
|
-
has occurred. Once published, install with `npm install tamil-toolkit@alpha`.
|
|
6
|
+
Install the experimental MIT-licensed alpha on npm with `npm install tamil-toolkit@alpha`.
|
|
8
7
|
These adapters serialize calls into the shared Rust dispatcher. Planned modules
|
|
9
8
|
are excluded. APIs may change before stability. Node 22+ is supported; browser
|
|
10
9
|
consumers must initialize the WASM module before calling its functions.
|
|
@@ -18,7 +17,7 @@ console.log(format_currency(102550, "LKR", "SL")); // LKR 1,025.50
|
|
|
18
17
|
|
|
19
18
|
The package includes core Unicode/Ezhuthu functions, Agara collation, bounded
|
|
20
19
|
TN/SL integer and currency words, fractions, Gregorian dates, and explicit
|
|
21
|
-
Bamini conversion. For browser code use the `/web` entry point, `await init()`,
|
|
20
|
+
Bamini and bounded TSCII, TAB, TAM and Anjal byte conversion. For browser code use the `/web` entry point, `await init()`,
|
|
22
21
|
then call the same methods. Hosts must serve the packaged WASM file with the
|
|
23
22
|
generated loader; bundlers must support WebAssembly assets and ES modules.
|
|
24
23
|
See LICENSE, THIRD_PARTY_NOTICES.md, and bundled dependency license notices.
|
|
@@ -28,3 +27,13 @@ Use the comparison result or numeric-array keys for ordering; comparing their
|
|
|
28
27
|
JSON string representation is incorrect. The versioned `agara-v1` profile and
|
|
29
28
|
its mixed-script fallback are specified at
|
|
30
29
|
https://github.com/abishtakan/tamil-toolkit/tree/HEAD/docs/specs/collate-v0.1.md.
|
|
30
|
+
|
|
31
|
+
This distribution provides `tscii_bytes_to_unicode(new Uint8Array([0xba, 0xa2, 0xc5, 0xfd]))`.
|
|
32
|
+
|
|
33
|
+
`unicode_to_tscii_bytes(text)` returns an array of byte values.
|
|
34
|
+
|
|
35
|
+
This distribution provides `tab_bytes_to_unicode(bytes)` and `unicode_to_tab_bytes(text)`.
|
|
36
|
+
|
|
37
|
+
This distribution provides `tam_bytes_to_unicode(bytes)` and `unicode_to_tam_bytes(text)`; TAM bytes do not preserve Latin letters.
|
|
38
|
+
|
|
39
|
+
This distribution provides `anjal_bytes_to_unicode(bytes)` and `unicode_to_anjal_bytes(text)`; ambiguous legacy bytes raise an error.
|
package/pkg-web/package.json
CHANGED
|
Binary file
|