Thai Baht Text JS
Convert number to Thai Baht as Text
แปลงเลขให้เป็นหน่วยบาทไทย
Installation
วิธีติดตั้ง
npm install thai-baht-text async --save
or
yarn add thai-baht-text async
Usage
วิธีการใช้งาน
Javascript ES5
const THBText = // for ES5 let money = 10050let moneyText = console// OUTPUT: หนึ่งหมื่นห้าสิบบาทถ้วน money = 1234567898888850 console// OUTPUT: สิบสองล้านล้านสามแสนสี่หมื่นห้าพันหกร้อยเจ็ดสิบแปดล้านเก้าแสนแปดหมื่นแปดพันแปดร้อยแปดสิบแปดบาทห้าสิบสตางค์
ES5 Example
More infomationJavascript ES6
let money = 10050let moneyText = console// OUTPUT: หนึ่งหมื่นห้าสิบบาทถ้วน money = 1234567898888850 console// OUTPUT: สิบสองล้านล้านสามแสนสี่หมื่นห้าพันหกร้อยเจ็ดสิบแปดล้านเก้าแสนแปดหมื่นแปดพันแปดร้อยแปดสิบแปดบาทห้าสิบสตางค์
ES6 Example
More infomationBrowser version (UMD)
More infomationCAUTION!
You can use number that doesn't over than 9007199254740991
that is MAX_SAFE_INTEGER
of javascript.
คุณสามารถใส่เลขได้ไม่เกิน 9007199254740991
ซึ่งเป็น MAX_SAFE_INTEGER
ของ javascript
Library & Development Tools
- Javascript ES6
- Async
- Babel
License
The Thai-Baht-Text JS is open-sourced software licensed under the MIT license.
Ending message
If you found bugs or some missing point, please send pull request back or open an issue.
Thank you so much 😃
Regards,
Jirachai Chansivanon
แปลง เลข เป็น บาทไทย,
thai baht text javascript,
thai baht text js