resolve-url.js 295 B

123456789101112
  1. // Copyright 2014 Simon Lydell
  2. // X11 (“MIT”) Licensed. (See LICENSE.)
  3. var url = require("url")
  4. function resolveUrl(/* ...urls */) {
  5. return Array.prototype.reduce.call(arguments, function(resolved, nextUrl) {
  6. return url.resolve(resolved, nextUrl)
  7. })
  8. }
  9. module.exports = resolveUrl