tdlib-native
Version:
🚀 Telegram TDLib native nodejs wrapper
21 lines (20 loc) • 502 B
JavaScript
import path from "path";
import { fileURLToPath } from "url";
function getCurrentFile() {
if (typeof __filename !== "undefined") {
return __filename;
}
if (typeof import.meta.filename === "string") {
return import.meta.filename;
}
return fileURLToPath(import.meta.url);
}
function compilerMagic$(value) {
return value;
}
function getAddonFolderPath() {
return path.dirname(/* compilerMagic$(getCurrentFile()) */ fileURLToPath(import.meta.url));
}
export {
getAddonFolderPath
};