feat: ProxyUtils.removeFlag

This commit is contained in:
xream
2024-06-02 18:30:53 +08:00
parent 99d058bcf1
commit b6f848a6e6
5 changed files with 14 additions and 10 deletions

View File

@@ -430,6 +430,13 @@ export function getISO(name) {
return ISOFlags[getFlag(name)]?.[0];
}
// remove flag
export function removeFlag(str) {
return str
.replace(/[\uD83C][\uDDE6-\uDDFF][\uD83C][\uDDE6-\uDDFF]|🏴‍☠️|🏳️‍🌈/g, '')
.trim();
}
export class MMDB {
constructor({ country, asn } = {}) {
if ($.env.isNode) {