Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 610 Bytes

readme.md

File metadata and controls

29 lines (19 loc) · 610 Bytes

将数字转为千分位金额,数字转为大写金额

npm地址

https://www.npmjs.com/package/changenumtomoney

安装

npm install changenumtomoney --save

引用

import { changeNumToMoney, changeNumMoneyToChinese } from 'changenumtomoney'
const { changeNumToMoney, changeNumMoneyToChinese } = require('changenumtomoney')

使用

console.log(changeNumToMoney(123456789)) // 123,456,789
console.log(changeNumMoneyToChinese(123456789)) // 壹亿贰仟叁佰肆拾伍万陆仟柒佰捌拾玖元整