npm install bahtrext@2.5.0
npm install bahtrext@1.7.2
index.test.js
101
ควรจะถูกอ่านอย่างไร ?
หนึ่งร้อยหนึ่งบาทถ้วน
Google Sheets
สัญญากู้เงินของธนาคาร
* ลองมากู้ได้เลยครับ ถ้าไม่ใช่บอกผมด้วยเอ็ด
เมื่อหลักสิบมีค่า เช่น สิบเอ็ด
, ยี่สิบเอ็ด
หนึ่งร้อยเอ็ดบาทถ้วน
หนึ่งร้อยหนึ่งบาทถ้วน
หรือ หนึ่งร้อยเอ็ดบาทถ้วน
ก็ได้ ให้เข้าใจได้ตรงกัน
Rest Parameters
=> add function BulkReplace
, applyReplacements
BR
เอ็ด
Googolplex
flowchart TD
A(ABT) -->|input type| B{Type}
B --> |Number| C(iTHBText)
B --> |String| D{Allow Negative ?}
D --> |True| E(NEG)
D --> |False| F(BF)
E --> F(BF)
F --> G(BT)
G --> |Convert Number to Decimal| H(BahtText)
H --> I(MoneyLaundering)
I --> J(splitIntFrac)
J --> |moneyFull| K[/moneyFull/]
J --> |moneyInt| L[/moneyInt/]
J --> |moneyFrac| M[/moneyFrac/]
K --> |moneyFull| N{Match Zero ?}
N --> |True| P[/Zero/]
P --> ZZZ(return)
M --> |moneyFrac| O(PrintSatangs)
O --> |satang_part| R
L --> |moneyInt| Q(PrintBaht)
Q --> |baht_part| R(Concat)
R --> ZZZ