tdlib-native
Version:
🚀 Telegram TDLib native nodejs wrapper
22 lines (21 loc) • 865 B
JavaScript
;
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const path = require("path");
const url = require("url");
var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
function getCurrentFile() {
if (typeof __filename !== "undefined") {
return __filename;
}
if (false) {
return void 0;
}
return url.fileURLToPath(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("src/addon/path.js", document.baseURI).href);
}
function compilerMagic$(value) {
return value;
}
function getAddonFolderPath() {
return path.dirname(/* compilerMagic$(getCurrentFile()) */ __filename);
}
exports.getAddonFolderPath = getAddonFolderPath;