comma it 在数字上添加逗号以将它们转换为金额
逗号-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'
下载地址
用户评论