mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-01 01:25:45 -04:00
13 lines
285 B
JavaScript
13 lines
285 B
JavaScript
/*
|
|
* 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);
|
|
}
|