@lailao10x/lao-currency
v0.0.13
Published
Lao currency format
Downloads
6
Readme
lao-currency
Convert normal number to currency format.
ປ່ຽນຕົວເລກຈາກທຳມະດາໃຫ້ເປັນຮູບແບບເງີນຕາເຊັ່ນ: ກີບ, ໂດລາ ແລະ ອື່ນໆ
Installation
# using npm
npm install @lailao10x/lao-currency
# using yarn
yarn add @lailao10x/lao-currency
Usage
# ES5
const laoCurrency = require('@lailao10x/lao-currency');
# ES6
import laoCurrency from '@lailao10x/lao-currency';
Example
const getLaoCurrency = laoCurrency(100000).format();
console.log(getLaoCurrency);
// result: 100,000
const getLaoCurrency = laoCurrency(100000).format("S LAK");
console.log(getLaoCurrency);
// result: ₭100,000
const getLaoCurrency = laoCurrency(100000).format("LAK S");
console.log(getLaoCurrency);
// result: 100,000₭
Code and meanings are as follows:
| Code | Meaning |
| ----- | ------------- |
| LAK
| Lao kip |
| USD
| US Dollar |
| THB
| Thai Baht |
| S
| Symbol ₭ or $ |