mirror of
https://github.com/SukkaW/Surge.git
synced 2026-02-03 12:31:54 +08:00
Refactor: simplify build infra
This commit is contained in:
@@ -42,13 +42,11 @@ const compare = (a, b) => {
|
||||
* @param {import('gorhill-publicsuffixlist').default | null} [gorhill]
|
||||
*/
|
||||
const createDomainSorter = (gorhill = null) => {
|
||||
const cached = require('./cached-tld-parse');
|
||||
|
||||
if (gorhill) {
|
||||
/**
|
||||
* @param {string} input
|
||||
*/
|
||||
const getDomain = cached.createCachedGorhillGetDomain(gorhill);
|
||||
const getDomain = require('./cached-tld-parse').createCachedGorhillGetDomain(gorhill);
|
||||
|
||||
/**
|
||||
* @param {string} a
|
||||
@@ -66,7 +64,7 @@ const createDomainSorter = (gorhill = null) => {
|
||||
};
|
||||
}
|
||||
|
||||
const tldts = cached;
|
||||
const tldts = require('./cached-tld-parse');
|
||||
/**
|
||||
* @param {string} a
|
||||
* @param {string} b
|
||||
|
||||
Reference in New Issue
Block a user