1 line
788 B
JSON
1 line
788 B
JSON
{"ast":null,"code":"'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\n\nvar combineURLs = require('../helpers/combineURLs');\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\n\n\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n\n return requestedURL;\n};","map":null,"metadata":{},"sourceType":"script"} |