An open API service indexing awesome lists of open source software.

https://github.com/2ue/cn-nm

一个数值与汉字互相转换的工具。the number and chinese inner-transformation
https://github.com/2ue/cn-nm

chinese javascript number transformations

Last synced: 11 months ago
JSON representation

一个数值与汉字互相转换的工具。the number and chinese inner-transformation

Awesome Lists containing this project

README

          

# cn-nm
> 一个简单的中文和数字互转工具

[中文](https://github.com/2ue/cn-nm) | [English](./doc/en/README_en.md)

## 注意
由于javascript本身机制原因,容纳数值存在上下限,所以当数值过大,请以字符串形式传入。

## 使用方法
``` javascript
var CNNM = require('cn-nm');
CNNM.toCn('300000000056747740230023050789.889909');
//叁十穰零伍千陆百柒十肆京柒千柒百肆十兆贰千叁百亿贰千叁百零伍万零柒百捌十玖点捌捌玖玖零玖
CNNM.toNm('叁十穰零伍千陆百柒十肆京柒千柒百肆十兆贰千叁百亿贰千叁百零伍万零柒百捌十玖点捌捌玖玖零玖');
//300000000056747740230023050789.889909
```