tanisa 1.1.1 β†’ 1.1.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.
@@ -0,0 +1,66 @@
1
+ # Welcome to Tanisa πŸ‡²πŸ‡¬
2
+
3
+ Hey there,
4
+ Thanks for stopping by!
5
+ Whether you're here to squash bugs, sprinkle in new features, or just correct that one typo that's been bugging you β€” you're awesome and we appreciate you.
6
+
7
+ This guide is your magic scroll to contributing like a pro. Please read it before opening issues or sending pull requests. It helps us help _you_ help _us_.
8
+
9
+ ---
10
+
11
+ ## πŸ› Bug Reports & 🧠 Feature Ideas
12
+
13
+ Found a bug? Got a genius idea at 2AM? We want to hear it!
14
+ Pop it into the [GitHub Issues](https://github.com/nifaliana/tanisa/issues) β€” but first:
15
+
16
+ Check if someone else already reported it.
17
+ Include:
18
+
19
+ - How to make the bug appear (step-by-step wizardry)
20
+ - Your Tanisa version
21
+ - Any tweaks you made (we don’t judge)
22
+
23
+ ---
24
+
25
+ ## 🀝 Pull Requests
26
+
27
+ Pull requests are like party invites β€” we’re thrilled to receive them. Before you crash the repo with your awesome code:
28
+
29
+ 1. Work from the latest **main** branch.
30
+ 2. Check if someone already fixed that issue.
31
+ 3. For big stuff, open an issue first so we can cheer you on.
32
+
33
+ **To contribute**:
34
+
35
+ 1. Fork the repo.
36
+ 2. Make your changes β€” focus, grasshopper.
37
+ 3. Pass all local tests, pre-commits and pre-push (Tanisa is picky).
38
+ 4. Write meaningful and [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) messages (not just β€œfix stuff” πŸ˜…).
39
+ 5. Open that pull request.
40
+ 6. Watch the CI like a hawk β€” fix if it fails.
41
+ 7. Stick around for feedback, high fives, or emoji reactions.
42
+
43
+ ---
44
+
45
+ ## πŸ” Not Sure Where to Start?
46
+
47
+ We label issues with things like `help wanted`, `bug`, `enhancement`, and `question`.
48
+ Check out `help wanted` for a warm welcome into the codebase!
49
+
50
+ ---
51
+
52
+ ## Be Kind. Code Nice.
53
+
54
+ We follow the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
55
+ Basically: Be cool, be respectful, and remember β€” behind every GitHub handle is a real human with feelings.
56
+
57
+ ---
58
+
59
+ ## βš–οΈ License Stuff
60
+
61
+ Check the [LICENSE](LICENSE) file for the legal spells.
62
+ We may ask you to confirm you're cool with our open-source terms when you contribute.
63
+
64
+ ---
65
+
66
+ πŸŽ‰ That’s it! Now go forth, brave contributor, and may your PRs be swift and your bugs be tiny.
package/README.md CHANGED
@@ -3,7 +3,9 @@
3
3
  [![npm version](https://badge.fury.io/js/tanisa.svg)](https://www.npmjs.com/package/tanisa)
4
4
  ![License](https://img.shields.io/badge/License-MIT-yellow.svg)
5
5
 
6
- **Tanisa** (Malagasy πŸ‡²πŸ‡¬ for "to count") is here to give those digits a voice, transforming them into elegant Malagasy words.
6
+ **Tanisa** is here to give those digits a voice, transforming them into elegant Malagasy words πŸ‡²πŸ‡¬.
7
+
8
+ **In simpler terms** : An utility to convert malagasy numbers into their word representations.
7
9
 
8
10
  ## Features
9
11
 
@@ -40,6 +42,8 @@ tanisa.toWords(233)
40
42
  tanisa.toWords(233) ==> Telo amby telopolo sy roanjato
41
43
  tanisa.toWords(18.3) ==> Valo amby folo faingo telo
42
44
  tanisa.toWords(0.008) ==> Aotra faingo aotra aotra valo
45
+
46
+ tanisa.toWords(12_345_678_901) ==> iraika amby sivinjato sy valo arivo sy fito alina sy enina hetsy sy dimy tapitrisa sy efatra safatsiroa sy telo tsitamboisa sy roa lavitrisa sy iray alinkisa
43
47
  ```
44
48
 
45
49
  ## Options
@@ -54,13 +58,19 @@ tanisa.toWords(0.008) ==> Aotra faingo aotra aotra valo
54
58
  Examples:
55
59
 
56
60
  ```
57
- converter.toWords("456.789", { ignoreDecimal: true }) => Enina amby dimampolo sy efajato
61
+ tanisa.toWords("456.789", { ignoreDecimal: true }) => Enina amby dimampolo sy efajato
58
62
 
59
- converter.toWords("3.14567", { decimalPlaces: 2 }); ==> Telo faingo efatra amby folo
63
+ tanisa.toWords("3.14567", { decimalPlaces: 2 }); ==> Telo faingo efatra amby folo
60
64
 
61
- converter.toWords("3.14567", { decimalPlaces: 2, ignoreDecimal: true }); ==> Telo
65
+ tanisa.toWords("3.14567", { decimalPlaces: 2, ignoreDecimal: true }); ==> Telo
62
66
  ```
63
67
 
68
+ ## Contribution
69
+
70
+ **Contributions are welcome!**
71
+
72
+ Feel free to check out the [CONTRIBUTING](CONTRIBUTING) file.
73
+
64
74
  ## License
65
75
 
66
76
  This project is proudly released under the [MIT License](https://github.com/nifaliana/tanisa/blob/main/LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tanisa",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "main": "src/index.ts",
5
5
  "description": "An utility to convert Malagasy πŸ‡²πŸ‡¬ numbers, including decimals, into their word representations.",
6
6
  "license": "MIT",
@@ -37,16 +37,15 @@
37
37
  "vitest": "^3.1.1"
38
38
  },
39
39
  "keywords": [
40
- "malagasy",
41
- "number",
42
- "words",
40
+ "javascript",
41
+ "typescript",
42
+ "number-to-words",
43
43
  "converter",
44
44
  "i18n",
45
- "l10n",
46
45
  "toWords",
47
46
  "fanisana",
48
- "typescript",
49
- "javascript"
47
+ "malagasy",
48
+ "tanisa"
50
49
  ],
51
50
  "repository": {
52
51
  "type": "git",
package/src/converter.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { LargeNumberUnit, MalagasyNumerals } from './dictionary'
2
- import { TanisaOptions } from './interface'
1
+ import { MalagasyNumerals } from './dictionary'
2
+ import { TanisaOptions, LargeNumberUnit } from './interface'
3
3
 
4
4
  export class Tanisa {
5
5
  public toWords(number: number | string, options?: TanisaOptions): string {
package/src/dictionary.ts CHANGED
@@ -42,7 +42,7 @@ export const MalagasyNumerals = {
42
42
  'telonjato',
43
43
  'efajato',
44
44
  'dimanjato',
45
- 'enin-jato',
45
+ 'eninjato',
46
46
  'fitonjato',
47
47
  'valonjato',
48
48
  'sivinjato',
@@ -68,6 +68,3 @@ export const MalagasyNumerals = {
68
68
 
69
69
  MAX_SUPPORTED_INTEGER: 1_000_000_000_000_000_000 * 1000,
70
70
  } as const
71
-
72
- export type LargeNumberUnit =
73
- (typeof MalagasyNumerals.LARGE_NUMBER_UNITS)[number]
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  // src/index.ts
2
2
  export { Tanisa } from './converter'
3
- export { MalagasyNumerals, LargeNumberUnit } from './dictionary'
3
+ export { MalagasyNumerals } from './dictionary'
4
+ export { LargeNumberUnit, TanisaOptions } from './interface'
package/src/interface.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { MalagasyNumerals } from './dictionary'
2
+
1
3
  export interface TanisaOptions {
2
4
  /**
3
5
  * If true, ignores the decimal part of the number.
@@ -13,3 +15,6 @@ export interface TanisaOptions {
13
15
  */
14
16
  decimalPlaces?: number
15
17
  }
18
+
19
+ export type LargeNumberUnit =
20
+ (typeof MalagasyNumerals.LARGE_NUMBER_UNITS)[number]
@@ -32,7 +32,7 @@ describe('MalagasyNumberToWords', () => {
32
32
  [201, 'iraika amby roanjato'],
33
33
  [210, 'folo sy roanjato'],
34
34
  [225, 'dimy amby roapolo sy roanjato'],
35
- [600, 'enin-jato'],
35
+ [600, 'eninjato'],
36
36
  [999, 'sivy amby sivifolo sy sivinjato'],
37
37
  // // Thousands
38
38
  [1000, 'arivo'],