n8n-nodes-alive5
Version:
Send and receive SMS messages via alive5
13 lines • 480 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.withApiVersion = withApiVersion;
function withApiVersion(baseUrl, version) {
const trimmed = baseUrl.replace(/\/+$/, '');
const match = trimmed.match(/\/(1\.0|1\.1)$/);
if (match) {
const withoutVersion = trimmed.slice(0, -match[0].length);
return `${withoutVersion}/${version}`;
}
return `${trimmed}/${version}`;
}
//# sourceMappingURL=alive5Api.utils.js.map