uptime-kuma/server/util.js

17 lines
289 B
JavaScript
Raw Normal View History

2021-06-29 11:06:20 +03:00
/*
* Common functions - can be used in frontend or backend
*/
2021-07-01 16:47:14 +03:00
2021-06-29 11:06:20 +03:00
export function sleep(ms) {
2021-06-25 16:55:49 +03:00
return new Promise(resolve => setTimeout(resolve, ms));
}
2021-06-29 11:06:20 +03:00
export function ucfirst(str) {
const firstLetter = str.substr(0, 1);
return firstLetter.toUpperCase() + str.substr(1);
}