Update helper.js

Add sleep function
This commit is contained in:
freearhey 2021-01-20 01:02:24 +03:00
parent ddf7bd8352
commit 2a5e17ad2b
1 changed files with 6 additions and 0 deletions

View File

@ -249,6 +249,12 @@ helper.filterGroup = function (groupTitle) {
return groupTitle
}
helper.sleep = function (ms) {
return function (x) {
return new Promise(resolve => setTimeout(() => resolve(x), ms))
}
}
class Playlist {
constructor(data) {
this.header = data.header