UNPKG

always-helper

Version:

前端项目开发中,经常会用到一些工具函数的合集。

2 lines (1 loc) 201 B
export default function(e){var t=e.toString().split(".");return t[0].length>=4&&(t[0]=t[0].replace(/(\d)(?=(\d{3})+$)/g,"$1,")),t[1]&&t[1].length>=4&&(t[1]=t[1].replace(/(\d{3})/g,"$1 ")),t.join(".")}