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