UNPKG

noodl-loader

Version:

Loader for noodl applications

20 lines 795 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.configUri = exports.withBaseURL = void 0; const tslib_1 = require("tslib"); const R = tslib_1.__importStar(require("rambda")); const c = tslib_1.__importStar(require("../constants")); exports.withBaseURL = R.curryN(2, (baseURL, value = '') => { if (baseURL.endsWith('/') && value.startsWith('/')) { value = value.substring(1); } else if (!baseURL.endsWith('/') && !value.startsWith('/')) { value = `/${value}`; } return `${baseURL}${value}`; }); function configUri(value = '') { return (0, exports.withBaseURL)(c.baseRemoteConfigUrl)(value.endsWith('.yml') ? value : `${value}.yml`); } exports.configUri = configUri; //# sourceMappingURL=create.js.map