Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
//#region src/dev-worker/utils.ts
const DEFAULT_LOCAL_IPS = ["localhost", "127.0.0.1"];
function getIpFromEntry(entry, ipv4) {
let ip;
entry.replace(/https?:\/\/([0-9|.]+|localhost):/, (str, matched) => {
ip = matched;
return str;
});
if (ip) return DEFAULT_LOCAL_IPS.includes(ip) ? ipv4 : ip;
}
//#endregion
Object.defineProperty(exports, 'getIpFromEntry', {
enumerable: true,
get: function () {
return getIpFromEntry;
}
});