Skip to content

Commit 15d1c33

Browse files
committed
初始化项目
1 parent b05a2c7 commit 15d1c33

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
.DS_Store
3+
.vscode
4+
.idea

util.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* lin
3+
*/
4+
5+
/**
6+
* 金钱格式化,三位加逗号
7+
*/
8+
export const formatMoney = num => num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
9+
10+
11+
/**
12+
* 日期数字小于10,补“0”
13+
*/
14+
export function check(i) {
15+
let num;
16+
i < 10 ? num = "0" + i : num = i;
17+
return num;
18+
}
19+
20+

0 commit comments

Comments
 (0)