many update

This commit is contained in:
Louis
2021-06-29 16:06:20 +08:00
parent 932ebdb8d6
commit 9fa84a0a2b
10 changed files with 235 additions and 24 deletions

View File

@@ -1,3 +1,12 @@
exports.sleep = (ms) => {
/*
* Common functions - can be used in frontend or backend
*/
export function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export function ucfirst(str) {
const firstLetter = str.substr(0, 1);
return firstLetter.toUpperCase() + str.substr(1);
}