🛠A bunch of utility functions that work with number in 🇻🇳 Vietnamese language
- Zero dependencies
- Built-in support for Edge runtime
- Typesafe with TypeScript
- Fully documented
import { readVnNumber } from '@hckhanh/vn-number'
const result = readVnNumber(1250000)
console.log(result) // một triệu hai trăm năm mươi nghìn
import { formatVnNumber } from '@hckhanh/vn-number'
const result = formatVnNumber(1250000)
console.log(result) // 1.250.000
import { formatVnCurrency } from '@hckhanh/vn-number'
const result = formatVnCurrency(1250000)
console.log(result) // 1.250.000 â‚«
import { formatVnPercent } from '@hckhanh/vn-number'
const result = formatVnPercent(0.991)
console.log(result) // 99,1%
You can go to Releases page to see the release notes.