mirror of
https://github.com/snobu/destreamer.git
synced 2026-01-26 18:02:19 +00:00
Preserve input URL array order
* Implement forEachAsync * Preserve input URL array order Co-authored-by: kylon <kylonux@gmail.com>
This commit is contained in:
@@ -46,6 +46,10 @@ function readFileToArray(path: string) {
|
||||
return fs.readFileSync(path).toString('utf-8').split(/[\r\n]/);
|
||||
}
|
||||
|
||||
export async function forEachAsync(array: any, callback: any) {
|
||||
for (let i=0, l=array.length; i<l; ++i)
|
||||
await callback(array[i], i, array);
|
||||
}
|
||||
|
||||
export function parseVideoUrls(videoUrls: any) {
|
||||
let t = videoUrls[0] as string;
|
||||
|
||||
Reference in New Issue
Block a user