Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vh13294/number-to-khmer-word
Library for converting standard numerals to Khmer words
https://github.com/vh13294/number-to-khmer-word
Last synced: 20 days ago
JSON representation
Library for converting standard numerals to Khmer words
- Host: GitHub
- URL: https://github.com/vh13294/number-to-khmer-word
- Owner: vh13294
- License: mit
- Created: 2020-01-18T16:36:08.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T17:08:23.000Z (about 2 years ago)
- Last Synced: 2024-10-12T09:32:29.655Z (3 months ago)
- Language: TypeScript
- Homepage: https://vh13294.github.io/number-to-khmer-word/
- Size: 2.43 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Number to Khmer words
# Description
Javascript and Typescript library for converting Arabic numerals to Khmer words
# Installation
```bash
npm i number_to_khmer_word
```# Basic Usage
### Include Module
```ts
import { numberToWord } from 'number_to_khmer_word';const words = numberToWord(input: number | string)
// Example
numberToWord(100_000)
numberToWord('1000')
```For Currency Mode
CurrencyType = ['USD', 'KHR']
```ts
import { currencyToWord } from 'number_to_khmer_word';const words = currencyToWord(input: number | string, currency: currencyType)
// Example
currencyToWord(100_000, 'USD')
currencyToWord('1000', 'KHR')
```### TODO
- [ ] Allow copy paste but show error toast if invalid number (insert in series)
- [ ] Animate text change