0.0.2 • Published 4 years ago

@codog/number-to-chinese v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Number To Chinese

This is a js library that help you to transform number to chinese.

Install

npm i @codog/number-to-chinese

It provide two useful functions: numberToChinese and getChineseNumberList

numberToChinese is transform single number.

import { numberToChinese } from '@codog/number-to-chinese'

console.log(numberToChinese(1)) // Output: '一'

getChineseNumberList well provide a list of chinese number so you not need to iterate the numberToChinese function.

import { getChineseNumberList } from '@codog/number-to-chinese'

console.log(getChineseNumberList(3)) // Output: ['一', '二', '三']