Refactor: add more parsing

This commit is contained in:
SukkaW
2024-09-21 16:24:13 +08:00
parent 6425b6096e
commit 1783cccf7f
5 changed files with 97 additions and 39 deletions

View File

@@ -1,8 +1,7 @@
import picocolors from 'picocolors';
import { domainWildCardToRegex } from './misc';
import { domainWildCardToRegex, identity } from './misc';
import { isProbablyIpv4, isProbablyIpv6 } from './is-fast-ip';
const identity = <T>(x: T): T => x;
const unsupported = Symbol('unsupported');
// https://dreamacro.github.io/clash/configuration/rules.html