UNPKG

@piggly/fastify-chassis

Version:

An ESM/CommonJS toolkit to help you to do common operations in your back-end applications with Fastify and NodeJS.

21 lines 552 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mountURL = void 0; /** * Mount an URL based on a base and a relative path. * * @param {string} base * @param {string} relative_path * @returns {string} * @since 1.0.0 * @author Caique Araujo <caique@piggly.com.br> */ const mountURL = (base, relative_path) => { let path = relative_path; if (path.startsWith('/')) { path = path.substring(1); } return `${base}/${path}`; }; exports.mountURL = mountURL; //# sourceMappingURL=global.js.map