comma-it:在数字上添加逗号以将它们转换为金额

时间:2021-07-07 00:22:18
【文件属性】:
文件名称:comma-it:在数字上添加逗号以将它们转换为金额
文件大小:4KB
文件格式:ZIP
更新时间:2021-07-07 00:22:18
JavaScript 逗号-It.js 通过添加逗号将数字转换为更易读的数量的小模块: 1234.5 => 1,234.50 //require it var commaIt = require ( '../comma-it' ) ; commaIt ( '12341233,12' , { addPrecision : true } ) ; // => '12 341 233,12' 自定义分隔符: commaIt ( '12341233.12' , { addPrecision : true , thousandSeperator : ',' , decimalSeperator : '.' } ) ; // => 12,341,233.12'
【文件预览】:
comma-it-master
----.travis.yml(51B)
----package.json(460B)
----readme.md(578B)
----test()
--------comma-it-test.js(1KB)
----LICENSE(1KB)
----.gitignore(6B)
----comma-it.js(1KB)

网友评论