mirror of
https://github.com/SukkaW/Surge.git
synced 2026-02-03 12:31:54 +08:00
Refactor: use foxts more
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { fetchRemoteTextByLine } from './lib/fetch-text-by-line';
|
||||
import { task } from './trace';
|
||||
|
||||
import { createMemoizedPromise } from './lib/memo-promise';
|
||||
import { once } from 'foxts/once';
|
||||
import { IPListOutput } from './lib/rules/ip';
|
||||
import { createFileDescription } from './constants/description';
|
||||
|
||||
export const getChnCidrPromise = createMemoizedPromise(async function getChnCidr() {
|
||||
export const getChnCidrPromise = once(async function getChnCidr() {
|
||||
return Promise.all([
|
||||
fetchRemoteTextByLine('https://chnroutes2.cdn.skk.moe/chnroutes.txt', true).then(Array.fromAsync<string>),
|
||||
fetchRemoteTextByLine('https://gaoyifan.github.io/china-operator-ip/china6.txt', true).then(Array.fromAsync<string>)
|
||||
|
||||
Reference in New Issue
Block a user