jy-amount-format

1.0.2 • Public • Published

安装

npm i jy-amount-format --save

引入方式

import { formatAmount } from 'jy-amount-format'

功能说明

金额格式化

使用示例

import { formatAmount } from 'jy-amount-format'

console.log(formatAmount(1)) // 1.00
console.log(formatAmount(1.2, 2)) // 1.20
console.log(formatAmount(1000, 2)) // 1,000.00
console.log(formatAmount(10000, 3)) // 10,000.000
console.log(formatAmount(8888.88, 13)) // 8,888.8800000000000
console.log(formatAmount(13513518.0000133, 10)) // 13,513,518.0000133000
console.log(formatAmount(-13513518.0000133, 10)) // 13,513,518.0000133000
console.log(formatAmount(-8888.88, 13)) // 8,888.8800000000000

Readme

Keywords

none

Package Sidebar

Install

npm i jy-amount-format

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

3.45 kB

Total Files

4

Last publish

Collaborators

  • cxqdfe