mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-03-20 13:22:35 +08:00
Fixed ESLint issues
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-undef */
|
||||
import { ENV } from './open-api';
|
||||
import $ from '../core/app';
|
||||
|
||||
@@ -238,7 +239,7 @@ export default function express({ port } = { port: 3000 }) {
|
||||
|
||||
function extractURL(url) {
|
||||
// extract path
|
||||
const match = url.match(/https?:\/\/[^\/]+(\/[^?]*)/) || [];
|
||||
const match = url.match(/https?:\/\/[^/]+(\/[^?]*)/) || [];
|
||||
const path = match[1] || '/';
|
||||
|
||||
// extract query string
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-undef */
|
||||
export function ENV() {
|
||||
const isQX = typeof $task !== 'undefined';
|
||||
const isLoon = typeof $loon !== 'undefined';
|
||||
@@ -18,7 +19,7 @@ export function HTTP(defaultOptions = { baseURL: '' }) {
|
||||
'PATCH',
|
||||
];
|
||||
const URL_REGEX =
|
||||
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/;
|
||||
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;
|
||||
|
||||
function send(method, options) {
|
||||
options = typeof options === 'string' ? { url: options } : options;
|
||||
|
||||
Reference in New Issue
Block a user