{
  "_id": "resolve-url",
  "maintainers": [
    {
      "name": "lydell",
      "email": "simon.lydell@gmail.com"
    }
  ],
  "keywords": [
    "resolve",
    "url"
  ],
  "dist-tags": {
    "latest": "0.2.1"
  },
  "author": {
    "name": "Simon Lydell"
  },
  "_rev": "10-c1281aab9ce4c124349d065cb66af0b0",
  "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.",
  "readme": "Overview\r\n========\r\n\r\n[![browser support](https://ci.testling.com/lydell/resolve-url.png)](https://ci.testling.com/lydell/resolve-url)\r\n\r\nLike Node.js’ [`path.resolve`]/[`url.resolve`] for the browser.\r\n\r\n```js\r\nvar resolveUrl = require(\"resolve-url\")\r\n\r\nwindow.location\r\n// https://example.com/articles/resolving-urls/edit\r\n\r\nresolveUrl(\"remove\")\r\n// https://example.com/articles/resolving-urls/remove\r\n\r\nresolveUrl(\"/static/scripts/app.js\")\r\n// https://example.com/static/scripts/app.js\r\n\r\n// Imagine /static/scripts/app.js contains `//# sourceMappingURL=../source-maps/app.js.map`\r\nresolveUrl(\"/static/scripts/app.js\", \"../source-maps/app.js.map\")\r\n// https://example.com/static/source-maps/app.js.map\r\n\r\nresolveUrl(\"/static/scripts/app.js\", \"../source-maps/app.js.map\", \"../coffee/app.coffee\")\r\n// https://example.com/static/coffee/app.coffee\r\n\r\nresolveUrl(\"//cdn.example.com/jquery.js\")\r\n// https://cdn.example.com/jquery.js\r\n\r\nresolveUrl(\"http://foo.org/\")\r\n// http://foo.org/\r\n```\r\n\r\n\r\nInstallation\r\n============\r\n\r\n- `npm install resolve-url`\r\n- `bower install resolve-url`\r\n- `component install lydell/resolve-url`\r\n\r\nWorks with CommonJS, AMD and browser globals, through UMD.\r\n\r\n\r\nUsage\r\n=====\r\n\r\n### `resolveUrl(...urls)` ###\r\n\r\nPass one or more urls. Resolves the last one to an absolute url, using the\r\nprevious ones and `window.location`.\r\n\r\nIt’s like starting out on `window.location`, and then clicking links with the\r\nurls as `href` attributes in order, from left to right.\r\n\r\nUnlike Node.js’ [`path.resolve`], this function always goes through all of the\r\narguments, from left to right. `path.resolve` goes from right to left and only\r\nin the worst case goes through them all. Should that matter.\r\n\r\nActually, the function is _really_ like clicking a lot of links in series: An\r\nactual `<a>` gets its `href` attribute set for each url! This means that the\r\nurl resolution of the browser is used, which makes this module really\r\nlight-weight.\r\n\r\nAlso note that this functions deals with urls, not paths, so in that respect it\r\nhas more in common with Node.js’ [`url.resolve`]. But the arguments are more\r\nlike [`path.resolve`].\r\n\r\n[`path.resolve`]: http://nodejs.org/api/path.html#path_path_resolve_from_to\r\n[`url.resolve`]: http://nodejs.org/api/url.html#url_url_resolve_from_to\r\n\r\n\r\nTests\r\n=====\r\n\r\nRun `npm test`, which lints the code and then gives you a link to open in a\r\nbrowser of choice (using `testling`).\r\n\r\n\r\nLicense\r\n=======\r\n\r\n[The X11 (“MIT”) License](LICENSE).\r\n",
  "repository": {
    "type": "git",
    "url": "git://github.com/lydell/resolve-url"
  },
  "users": {
    "brandonpapworth": true
  },
  "bugs": {
    "url": "https://github.com/lydell/resolve-url/issues"
  },
  "license": "MIT",
  "versions": {
    "0.1.0": {
      "name": "resolve-url",
      "version": "0.1.0",
      "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.",
      "author": {
        "name": "Simon Lydell"
      },
      "license": "MIT",
      "main": "resolve-url.js",
      "repository": {
        "type": "git",
        "url": "git://github.com/lydell/resolve-url"
      },
      "keywords": [
        "resolve",
        "url"
      ],
      "scripts": {
        "test": "jshint resolve-url.js test/ && testling -u"
      },
      "devDependencies": {
        "testling": "~1.6.0",
        "mocha": "~1.17.1",
        "chai": "~1.9.0",
        "jshint": "~2.4.3"
      },
      "testling": {
        "harness": "mocha",
        "files": "test/*.js",
        "browsers": [
          "ie/8..latest",
          "chrome/latest",
          "firefox/latest",
          "opera/12",
          "opera/latest",
          "safari/5",
          "iphone/6",
          "android-browser/4"
        ]
      },
      "bugs": {
        "url": "https://github.com/lydell/resolve-url/issues"
      },
      "homepage": "https://github.com/lydell/resolve-url",
      "_id": "resolve-url@0.1.0",
      "dist": {
        "shasum": "f7d376cb5784b0b0fbf54d822b3d516666358fca",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/resolve-url/-/resolve-url-0.1.0.tgz",
        "integrity": "sha512-bFO1upsRMmNuGLEUA1pggBn9H41n96XEEem49KRdwggFimxALsYlfn/otQ3ReAfXiTgoXH3FM1k584EQSQ0KOg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIHV8h2e4Xbzp25IttY1d4Ihh2ua7afSNV218h71vkiznAiAatVq2Dy+jfHJM40mKFIhKX7FI+P5jIbP0bldhqanD2g=="
          }
        ]
      },
      "_from": ".",
      "_npmVersion": "1.4.3",
      "_npmUser": {
        "name": "lydell",
        "email": "simon.lydell@gmail.com"
      },
      "maintainers": [
        {
          "name": "lydell",
          "email": "simon.lydell@gmail.com"
        }
      ],
      "directories": {},
      "deprecated": "https://github.com/lydell/resolve-url#deprecated"
    },
    "0.2.0": {
      "name": "resolve-url",
      "version": "0.2.0",
      "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.",
      "author": {
        "name": "Simon Lydell"
      },
      "license": "MIT",
      "main": "resolve-url.js",
      "repository": {
        "type": "git",
        "url": "git://github.com/lydell/resolve-url"
      },
      "keywords": [
        "resolve",
        "url"
      ],
      "scripts": {
        "test": "jshint resolve-url.js test/ && testling -u"
      },
      "devDependencies": {
        "testling": "~1.6.0",
        "jshint": "~2.4.3",
        "tape": "~2.5.0"
      },
      "testling": {
        "files": "test/*.js",
        "browsers": [
          "ie/8..latest",
          "chrome/latest",
          "firefox/latest",
          "opera/12",
          "opera/latest",
          "safari/5",
          "iphone/6",
          "android-browser/4"
        ]
      },
      "bugs": {
        "url": "https://github.com/lydell/resolve-url/issues"
      },
      "homepage": "https://github.com/lydell/resolve-url",
      "_id": "resolve-url@0.2.0",
      "dist": {
        "shasum": "9479e58d94ea036d13f550d6ca14c3938cebbf67",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/resolve-url/-/resolve-url-0.2.0.tgz",
        "integrity": "sha512-UMqmj6ZZDqtRKEQhEqsiBNPLzk/tWMWoHYminFbqIxYP+zrCGJZC2kCkoEEqM80OJ3FuoWTd29Du/S3neWS+8g==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIBWptpJwHmI+oXjHOEmrIKsdVZHlWn69umjFrUfkity9AiEAwQcCW+iNOu3/145Tjd13aUnWLPF5PUBuumHz1we2nks="
          }
        ]
      },
      "_from": ".",
      "_npmVersion": "1.4.4",
      "_npmUser": {
        "name": "lydell",
        "email": "simon.lydell@gmail.com"
      },
      "maintainers": [
        {
          "name": "lydell",
          "email": "simon.lydell@gmail.com"
        }
      ],
      "directories": {},
      "deprecated": "https://github.com/lydell/resolve-url#deprecated"
    },
    "0.2.1": {
      "name": "resolve-url",
      "version": "0.2.1",
      "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.",
      "author": {
        "name": "Simon Lydell"
      },
      "license": "MIT",
      "main": "resolve-url.js",
      "repository": {
        "type": "git",
        "url": "git://github.com/lydell/resolve-url"
      },
      "keywords": [
        "resolve",
        "url"
      ],
      "scripts": {
        "test": "jshint resolve-url.js test/ && testling -u"
      },
      "devDependencies": {
        "testling": "~1.6.0",
        "jshint": "~2.4.3",
        "tape": "~2.5.0"
      },
      "testling": {
        "files": "test/*.js",
        "browsers": [
          "ie/8..latest",
          "chrome/latest",
          "firefox/latest",
          "opera/12",
          "opera/latest",
          "safari/5",
          "iphone/6",
          "android-browser/4"
        ]
      },
      "bugs": {
        "url": "https://github.com/lydell/resolve-url/issues"
      },
      "homepage": "https://github.com/lydell/resolve-url",
      "_id": "resolve-url@0.2.1",
      "dist": {
        "shasum": "2c637fe77c893afd2a663fe21aa9080068e2052a",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/resolve-url/-/resolve-url-0.2.1.tgz",
        "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIEXdCKyCdgQomVxe1qkiHa09rTz3ICDr+coehy9sXRDYAiEA5lv3DgRbWVxkBuvuyaqrgXNMHK9pi307+JzRD+I6JHM="
          }
        ]
      },
      "_from": ".",
      "_npmVersion": "1.4.4",
      "_npmUser": {
        "name": "lydell",
        "email": "simon.lydell@gmail.com"
      },
      "maintainers": [
        {
          "name": "lydell",
          "email": "simon.lydell@gmail.com"
        }
      ],
      "directories": {},
      "deprecated": "https://github.com/lydell/resolve-url#deprecated"
    }
  },
  "name": "resolve-url",
  "time": {
    "modified": "2026-05-20T15:56:43.773Z",
    "created": "2014-02-23T20:21:23.451Z",
    "0.1.0": "2014-02-23T20:21:23.452Z",
    "0.2.0": "2014-02-24T20:38:15.897Z",
    "0.2.1": "2014-02-25T18:48:50.732Z"
  },
  "readmeFilename": "readme.md",
  "homepage": "https://github.com/lydell/resolve-url"
}