@zougui/furaffinity
Version:
19 lines • 529 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.fixFaUrl = void 0;
const removeTrailing_1 = require("./removeTrailing");
const fixFaUrl = (str) => {
if (!str) {
return str;
}
str = (0, removeTrailing_1.removeTrailing)(str, '/');
if (str.startsWith('//')) {
return `https:${str}`;
}
if (!str.startsWith('/')) {
return str;
}
return `https://www.furaffinity.net${str}`;
};
exports.fixFaUrl = fixFaUrl;
//# sourceMappingURL=fixFaUrl.js.map