Sha256: 0638de5fcbc775b6f5201831791fb9ecfb89a2b690b3fe814c8e3de80bf2affb
Contents?: true
Size: 695 Bytes
Versions: 24
Compression:
Stored size: 695 Bytes
Contents
'use strict'; var isAbsoluteURL = require('../helpers/isAbsoluteURL'); var combineURLs = require('../helpers/combineURLs'); /** * Creates a new URL by combining the baseURL with the requestedURL, * only when the requestedURL is not already an absolute URL. * If the requestURL is absolute, this function returns the requestedURL untouched. * * @param {string} baseURL The base URL * @param {string} requestedURL Absolute or relative URL to combine * @returns {string} The combined full path */ module.exports = function buildFullPath(baseURL, requestedURL) { if (baseURL && !isAbsoluteURL(requestedURL)) { return combineURLs(baseURL, requestedURL); } return requestedURL; };
Version data entries
24 entries across 15 versions & 4 rubygems