1. 首页
  2. 考试认证
  3. 其它
  4. comma it 在数字上添加逗号以将它们转换为金额

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

上传者: 2024-10-05 05:02:32上传 ZIP文件 3.55KB 热度 2次
逗号-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'
下载地址
用户评论