Giter Club home page Giter Club logo

thai-baht-text-js's Introduction

Thai Baht Text JS

Build Status NPM Download codecov-svg NPM Version license-svg

Installation | Usage

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 = require('thai-baht-text') // for ES5

let money = 10050
let moneyText = THBText(money)

console.log(moneyText)
// OUTPUT: หนึ่งหมื่นห้าสิบบาทถ้วน

money = 12345678988888.50

console.log(THBText(money))
// OUTPUT: สิบสองล้านล้านสามแสนสี่หมื่นห้าพันหกร้อยเจ็ดสิบแปดล้านเก้าแสนแปดหมื่นแปดพันแปดร้อยแปดสิบแปดบาทห้าสิบสตางค์

More infomation ES5 Example


Javascript ES6

import THBText from 'thai-baht-text' // for ES6

let money = 10050
let moneyText = THBText(money)

console.log(moneyText)
// OUTPUT: หนึ่งหมื่นห้าสิบบาทถ้วน

money = 12345678988888.50

console.log(THBText(money))
// OUTPUT: สิบสองล้านล้านสามแสนสี่หมื่นห้าพันหกร้อยเจ็ดสิบแปดล้านเก้าแสนแปดหมื่นแปดพันแปดร้อยแปดสิบแปดบาทห้าสิบสตางค์

More infomation ES6 Example

More infomation Browser version (UMD)

CAUTION!

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

thai-baht-text-js's People

Contributors

antronic avatar zugarzeeker avatar nathawat avatar n3tr avatar dependabot[bot] avatar ak1103dev avatar imgrbs avatar demonmhon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.