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

Version Path
waves_lib-0.1.0 js/node_modules/axios/lib/core/buildFullPath.js
reed_sdk-1.0.1 node_modules/axios/lib/core/buildFullPath.js
reed_sdk-1.0.0 node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.1.4 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.1.4 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.1.3 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.1.3 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.1.2 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.1.2 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.1.1 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.1.1 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.1.0 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.1.0 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.0.9 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.0.9 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.0.8 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.0.8 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.0.7 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.0.7 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/buildFullPath.js
authing_ruby-1.0.6 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js