Skip to content

Commit

Permalink
fix: const
Browse files Browse the repository at this point in the history
  • Loading branch information
VirgilClyne committed Dec 2, 2024
1 parent 8ebadf5 commit 0d18d59
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
7 changes: 2 additions & 5 deletions src/Composite.Subtitles.response.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ import Composite from "./class/Composite.mjs";
const url = new URL($request.url);
Console.info(`url: ${url.toJSON()}`);
// 获取连接参数
const METHOD = $request.method,
HOST = url.hostname,
PATH = url.pathname,
PATHs = url.pathname.split("/").filter(Boolean);
Console.info(`METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`);
const PATHs = url.pathname.split("/").filter(Boolean);
Console.info(`PATHs: ${PATHs}`);
// 解析格式
let FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0];
if (FORMAT === "application/octet-stream" || FORMAT === "text/plain") FORMAT = detectFormat(url, $response?.body, FORMAT);
Expand Down
7 changes: 2 additions & 5 deletions src/Composite.Subtitles.response.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ Console.debug = () => {};
const url = new URL($request.url);
Console.info(`url: ${url.toJSON()}`);
// 获取连接参数
const METHOD = $request.method,
HOST = url.hostname,
PATH = url.pathname,
PATHs = url.pathname.split("/").filter(Boolean);
Console.info(`METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`);
const PATHs = url.pathname.split("/").filter(Boolean);
Console.info(`PATHs: ${PATHs}`);
// 解析格式
let FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0];
if (FORMAT === "application/octet-stream" || FORMAT === "text/plain") FORMAT = detectFormat(url, $response?.body, FORMAT);
Expand Down
7 changes: 2 additions & 5 deletions src/External.Subtitles.response.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ import Composite from "./function/Composite.mjs";
const url = new URL($request.url);
Console.info(`url: ${url.toJSON()}`);
// 获取连接参数
const METHOD = $request.method,
HOST = url.hostname,
PATH = url.pathname,
PATHs = url.pathname.split("/").filter(Boolean);
Console.info(`METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`);
const PATHs = url.pathname.split("/").filter(Boolean);
Console.info(`PATHs: ${PATHs}`);
// 解析格式
let FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0];
if (FORMAT === "application/octet-stream" || FORMAT === "text/plain") FORMAT = detectFormat(URL, $response?.body, FORMAT);
Expand Down

0 comments on commit 0d18d59

Please sign in to comment.