fix eslint && refine code
This commit is contained in:
@@ -104,8 +104,5 @@ export function html2Text(val) {
|
||||
|
||||
|
||||
export function toThousandslsFilter(num) {
|
||||
return (+num || 0).toString()
|
||||
.replace(/^\-?\d+/g, function (m) {
|
||||
return m.replace(/(?=(?!\b)(\d{3})+$)/g, ',');
|
||||
});
|
||||
return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','));
|
||||
}
|
||||
|
Reference in New Issue
Block a user