mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
update utils
This commit is contained in:
1 parent
6715bc457a
commit
39627bdd82
6 files changed
+63
-50
No files matched your search
@@ -6,6 +6,10 @@ export function capitalize(str) {
|
||||
return str.charAt(0).toUpperCase() + str.slice(1);
|
||||
}
|
||||
|
||||
export function isStringOrNumber(val) {
|
||||
return ['string', 'number'].includes(typeof val);
|
||||
}
|
||||
|
||||
export function secondToTime(second) {
|
||||
const add0 = (num) => (num < 10 ? `0${num}` : String(num));
|
||||
const hour = Math.floor(second / 3600);
|
||||
|
||||
Reference in new issue
Block a user