tamil-toolkit 0.0.0-stage → 0.1.0-alpha.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 tamil-toolkit contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,30 @@
1
- # Temporary Holding Version
1
+ # tamil-toolkit for TypeScript / WASM
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `just sync-bindings` produces Node and browser WASM builds and TypeScript
4
+ declarations. Node: `import * as tamil from 'tamil-toolkit'`. Browser:
5
+ `import { init, get_letters } from 'tamil-toolkit/web'; await init();`.
6
+ The experimental MIT-licensed `0.1.0-alpha.1` is being prepared; no registry upload
7
+ has occurred. Once published, install with `npm install tamil-toolkit@alpha`.
8
+ These adapters serialize calls into the shared Rust dispatcher. Planned modules
9
+ are excluded. APIs may change before stability. Node 22+ is supported; browser
10
+ consumers must initialize the WASM module before calling its functions.
11
+
12
+ ```javascript
13
+ import { format_fraction, format_currency } from "tamil-toolkit";
14
+
15
+ console.log(format_fraction(2, 4)); // 1/2
16
+ console.log(format_currency(102550, "LKR", "SL")); // LKR 1,025.50
17
+ ```
18
+
19
+ The package includes core Unicode/Ezhuthu functions, Agara collation, bounded
20
+ TN/SL integer and currency words, fractions, Gregorian dates, and explicit
21
+ Bamini conversion. For browser code use the `/web` entry point, `await init()`,
22
+ then call the same methods. Hosts must serve the packaged WASM file with the
23
+ generated loader; bundlers must support WebAssembly assets and ES modules.
24
+ See LICENSE, THIRD_PARTY_NOTICES.md, and bundled dependency license notices.
25
+
26
+ Both entry points expose `compare`, `sort_words`, `sort_key`, and `search_key`.
27
+ Use the comparison result or numeric-array keys for ordering; comparing their
28
+ JSON string representation is incorrect. The versioned `agara-v1` profile and
29
+ its mixed-script fallback are specified at
30
+ https://github.com/abishtakan/tamil-toolkit/tree/HEAD/docs/specs/collate-v0.1.md.