From 8a2473c64c8f19c86f7668b6312686d3dc6bbc39 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Wed, 8 Sep 2021 20:46:14 +0300 Subject: [PATCH] Update utils.js --- scripts/helpers/utils.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/scripts/helpers/utils.js b/scripts/helpers/utils.js index 6f8c7f33c..eb8f3d814 100644 --- a/scripts/helpers/utils.js +++ b/scripts/helpers/utils.js @@ -74,22 +74,6 @@ utils.removeProtocol = function (string) { return string.replace(/(^\w+:|^)\/\//, '') } -utils.filterFiles = function (arr, include = '', exclude = '') { - if (include) { - const included = include.split(',').map(filename => `channels/${filename}.m3u`) - - return arr.filter(filename => included.includes(filename)) - } - - if (exclude) { - const excluded = exclude.split(',').map(filename => `channels/${filename}.m3u`) - - return arr.filter(filename => !excluded.includes(filename)) - } - - return arr -} - utils.sleep = function (ms) { return function (x) { return new Promise(resolve => setTimeout(() => resolve(x), ms))