From 63ff22bf347a094dbf9c01be7f544ecdff970fe3 Mon Sep 17 00:00:00 2001 From: binaryify Date: Tue, 1 Jun 2021 10:12:52 +0800 Subject: [PATCH] fix eslint error --- app.js | 5 ++--- module/related_playlist.js | 3 ++- package-lock.json | 4 ++-- package.json | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app.js b/app.js index f7f5020..fb56df2 100644 --- a/app.js +++ b/app.js @@ -42,9 +42,8 @@ app.use((req, res, next) => { ;(req.headers.cookie || '').split(/\s*;\s*/).forEach((pair) => { let crack = pair.indexOf('=') if (crack < 1 || crack == pair.length - 1) return - req.cookies[ - decodeURIComponent(pair.slice(0, crack)).trim() - ] = decodeURIComponent(pair.slice(crack + 1)).trim() + req.cookies[decodeURIComponent(pair.slice(0, crack)).trim()] = + decodeURIComponent(pair.slice(crack + 1)).trim() }) next() }) diff --git a/module/related_playlist.js b/module/related_playlist.js index 6f64b3d..02e580f 100644 --- a/module/related_playlist.js +++ b/module/related_playlist.js @@ -13,7 +13,8 @@ module.exports = (query, request) => { }, ).then((response) => { try { - const pattern = /
[\s\S]*?[\s\S]*?]*>([^<]+?)<\/a>[\s\S]*?]*>([^<]+?)<\/a>/g + const pattern = + /