PK , }X twitch-3.0.0/PK , }X twitch-3.0.0/lib/PK , }X¯×–¥ twitch-3.0.0/lib/twitch.jsconst twitch = require("twitch-m3u8"); var tonicExpress = require("@runkit/runkit/express-endpoint/1.0.0"); var app = tonicExpress(module.exports); app.get('/', async(req, res) => { let quality = parseInt(req.query.q, 10);//0 = source let channel = req.query.c; if ( channel == "" || channel === undefined ){ console.log(channel,'channel undefined'); res.end('url/?c=channel&q=quality //0 = source'); return; }; //console.log(channel, quality); let streams = await twitch.getStream(channel); if (quality >= 0){ console.log(`redirecting to ${channel} quality ${quality}`) res.redirect(streams[quality].url); } else { console.log(`Creating html for ${channel}`); let html = `