This commit is contained in:
Eason010212
2022-10-18 15:24:38 +08:00
2 changed files with 17 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ stages:
- step: build@nodejs
name: build_nodejs
displayName: Nodejs 构建
nodeVersion: 12.16.1
nodeVersion: 16.14.2
commands:
- '# 设置NPM源提升安装速度'
- npm config set registry https://registry.npmmirror.com

View File

@@ -2426,4 +2426,20 @@ function timeStamp2String() {
var minute = datetime.getMinutes() < 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
var second = datetime.getSeconds() < 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
}
function isJSON(str) {
if (typeof str == 'string') {
try {
var obj = JSON.parse(str);
if (typeof obj == 'object' && obj) {
return true;
} else {
return false;
}
} catch (e) {
return false;
}
}
}