@codog/number-to-chinese
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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: ['一', '二', '三']

Readme

Keywords

Package Sidebar

Install

npm i @codog/number-to-chinese

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

5.92 kB

Total Files

6

Last publish

Collaborators

  • justforuse