1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2025-01-26 03:52:28 +02:00

13 lines
285 B
JavaScript
Raw Normal View History

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