Detailansicht verbessert
This commit is contained in:
		
							
								
								
									
										44
									
								
								express-server/node_modules/resolve-url/.jshintrc
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								express-server/node_modules/resolve-url/.jshintrc
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
{
 | 
			
		||||
  "bitwise": true,
 | 
			
		||||
  "camelcase": true,
 | 
			
		||||
  "curly": false,
 | 
			
		||||
  "eqeqeq": true,
 | 
			
		||||
  "es3": true,
 | 
			
		||||
  "forin": true,
 | 
			
		||||
  "immed": false,
 | 
			
		||||
  "indent": false,
 | 
			
		||||
  "latedef": "nofunc",
 | 
			
		||||
  "newcap": false,
 | 
			
		||||
  "noarg": true,
 | 
			
		||||
  "noempty": true,
 | 
			
		||||
  "nonew": false,
 | 
			
		||||
  "plusplus": false,
 | 
			
		||||
  "quotmark": false,
 | 
			
		||||
  "undef": true,
 | 
			
		||||
  "unused": "vars",
 | 
			
		||||
  "strict": false,
 | 
			
		||||
  "trailing": true,
 | 
			
		||||
  "maxparams": 5,
 | 
			
		||||
  "maxdepth": false,
 | 
			
		||||
  "maxstatements": false,
 | 
			
		||||
  "maxcomplexity": false,
 | 
			
		||||
  "maxlen": 100,
 | 
			
		||||
 | 
			
		||||
  "asi": true,
 | 
			
		||||
  "expr": true,
 | 
			
		||||
  "globalstrict": true,
 | 
			
		||||
  "smarttabs": true,
 | 
			
		||||
  "sub": true,
 | 
			
		||||
 | 
			
		||||
  "node": true,
 | 
			
		||||
  "browser": true,
 | 
			
		||||
  "globals": {
 | 
			
		||||
    "describe": false,
 | 
			
		||||
    "it": false,
 | 
			
		||||
    "before": false,
 | 
			
		||||
    "beforeEach": false,
 | 
			
		||||
    "after": false,
 | 
			
		||||
    "afterEach": false,
 | 
			
		||||
    "define": false
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										21
									
								
								express-server/node_modules/resolve-url/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								express-server/node_modules/resolve-url/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
The MIT License (MIT)
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2013 Simon Lydell
 | 
			
		||||
 | 
			
		||||
Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
in the Software without restriction, including without limitation the rights
 | 
			
		||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
furnished to do so, subject to the following conditions:
 | 
			
		||||
 | 
			
		||||
The above copyright notice and this permission notice shall be included in
 | 
			
		||||
all copies or substantial portions of the Software.
 | 
			
		||||
 | 
			
		||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
THE SOFTWARE.
 | 
			
		||||
							
								
								
									
										15
									
								
								express-server/node_modules/resolve-url/bower.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								express-server/node_modules/resolve-url/bower.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "resolve-url",
 | 
			
		||||
  "version": "0.2.1",
 | 
			
		||||
  "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.",
 | 
			
		||||
  "authors": ["Simon Lydell"],
 | 
			
		||||
  "license": "MIT",
 | 
			
		||||
  "main": "resolve-url.js",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "resolve",
 | 
			
		||||
    "url"
 | 
			
		||||
  ],
 | 
			
		||||
  "ignore": [
 | 
			
		||||
    ".*"
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										15
									
								
								express-server/node_modules/resolve-url/changelog.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								express-server/node_modules/resolve-url/changelog.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
### Version 0.2.1 (2014-02-25) ###
 | 
			
		||||
 | 
			
		||||
- Fix edge case when (accidentally) supplying only one argument, and that
 | 
			
		||||
  argument happens to be a falsy value such as `undefined` or `null`.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Version 0.2.0 (2014-02-24) ###
 | 
			
		||||
 | 
			
		||||
- Disallow passing 0 arguments. It’s weird and inconsistent between browsers.
 | 
			
		||||
  (Backwards incompatible change.)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Version 0.1.0 (2014-02-23) ###
 | 
			
		||||
 | 
			
		||||
- Initial release.
 | 
			
		||||
							
								
								
									
										15
									
								
								express-server/node_modules/resolve-url/component.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								express-server/node_modules/resolve-url/component.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "resolve-url",
 | 
			
		||||
  "version": "0.2.1",
 | 
			
		||||
  "license": "MIT",
 | 
			
		||||
  "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.",
 | 
			
		||||
  "main": "resolve-url.js",
 | 
			
		||||
  "repo": "lydell/resolve-url",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "resolve",
 | 
			
		||||
    "url"
 | 
			
		||||
  ],
 | 
			
		||||
  "scripts": [
 | 
			
		||||
    "resolve-url.js"
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										68
									
								
								express-server/node_modules/resolve-url/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								express-server/node_modules/resolve-url/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,68 @@
 | 
			
		||||
{
 | 
			
		||||
  "_from": "resolve-url@^0.2.1",
 | 
			
		||||
  "_id": "resolve-url@0.2.1",
 | 
			
		||||
  "_inBundle": false,
 | 
			
		||||
  "_integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
 | 
			
		||||
  "_location": "/resolve-url",
 | 
			
		||||
  "_phantomChildren": {},
 | 
			
		||||
  "_requested": {
 | 
			
		||||
    "type": "range",
 | 
			
		||||
    "registry": true,
 | 
			
		||||
    "raw": "resolve-url@^0.2.1",
 | 
			
		||||
    "name": "resolve-url",
 | 
			
		||||
    "escapedName": "resolve-url",
 | 
			
		||||
    "rawSpec": "^0.2.1",
 | 
			
		||||
    "saveSpec": null,
 | 
			
		||||
    "fetchSpec": "^0.2.1"
 | 
			
		||||
  },
 | 
			
		||||
  "_requiredBy": [
 | 
			
		||||
    "/source-map-resolve"
 | 
			
		||||
  ],
 | 
			
		||||
  "_resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
 | 
			
		||||
  "_shasum": "2c637fe77c893afd2a663fe21aa9080068e2052a",
 | 
			
		||||
  "_spec": "resolve-url@^0.2.1",
 | 
			
		||||
  "_where": "D:\\5CHITM\\Diplomarbeit\\SmartShopper\\SmartShopper\\express-server\\node_modules\\source-map-resolve",
 | 
			
		||||
  "author": {
 | 
			
		||||
    "name": "Simon Lydell"
 | 
			
		||||
  },
 | 
			
		||||
  "bugs": {
 | 
			
		||||
    "url": "https://github.com/lydell/resolve-url/issues"
 | 
			
		||||
  },
 | 
			
		||||
  "bundleDependencies": false,
 | 
			
		||||
  "deprecated": false,
 | 
			
		||||
  "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.",
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "jshint": "~2.4.3",
 | 
			
		||||
    "tape": "~2.5.0",
 | 
			
		||||
    "testling": "~1.6.0"
 | 
			
		||||
  },
 | 
			
		||||
  "homepage": "https://github.com/lydell/resolve-url#readme",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "resolve",
 | 
			
		||||
    "url"
 | 
			
		||||
  ],
 | 
			
		||||
  "license": "MIT",
 | 
			
		||||
  "main": "resolve-url.js",
 | 
			
		||||
  "name": "resolve-url",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
    "url": "git+https://github.com/lydell/resolve-url.git"
 | 
			
		||||
  },
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "test": "jshint resolve-url.js test/ && testling -u"
 | 
			
		||||
  },
 | 
			
		||||
  "testling": {
 | 
			
		||||
    "files": "test/*.js",
 | 
			
		||||
    "browsers": [
 | 
			
		||||
      "ie/8..latest",
 | 
			
		||||
      "chrome/latest",
 | 
			
		||||
      "firefox/latest",
 | 
			
		||||
      "opera/12",
 | 
			
		||||
      "opera/latest",
 | 
			
		||||
      "safari/5",
 | 
			
		||||
      "iphone/6",
 | 
			
		||||
      "android-browser/4"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  "version": "0.2.1"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										83
									
								
								express-server/node_modules/resolve-url/readme.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										83
									
								
								express-server/node_modules/resolve-url/readme.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,83 @@
 | 
			
		||||
Overview
 | 
			
		||||
========
 | 
			
		||||
 | 
			
		||||
[](https://ci.testling.com/lydell/resolve-url)
 | 
			
		||||
 | 
			
		||||
Like Node.js’ [`path.resolve`]/[`url.resolve`] for the browser.
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
var resolveUrl = require("resolve-url")
 | 
			
		||||
 | 
			
		||||
window.location
 | 
			
		||||
// https://example.com/articles/resolving-urls/edit
 | 
			
		||||
 | 
			
		||||
resolveUrl("remove")
 | 
			
		||||
// https://example.com/articles/resolving-urls/remove
 | 
			
		||||
 | 
			
		||||
resolveUrl("/static/scripts/app.js")
 | 
			
		||||
// https://example.com/static/scripts/app.js
 | 
			
		||||
 | 
			
		||||
// Imagine /static/scripts/app.js contains `//# sourceMappingURL=../source-maps/app.js.map`
 | 
			
		||||
resolveUrl("/static/scripts/app.js", "../source-maps/app.js.map")
 | 
			
		||||
// https://example.com/static/source-maps/app.js.map
 | 
			
		||||
 | 
			
		||||
resolveUrl("/static/scripts/app.js", "../source-maps/app.js.map", "../coffee/app.coffee")
 | 
			
		||||
// https://example.com/static/coffee/app.coffee
 | 
			
		||||
 | 
			
		||||
resolveUrl("//cdn.example.com/jquery.js")
 | 
			
		||||
// https://cdn.example.com/jquery.js
 | 
			
		||||
 | 
			
		||||
resolveUrl("http://foo.org/")
 | 
			
		||||
// http://foo.org/
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Installation
 | 
			
		||||
============
 | 
			
		||||
 | 
			
		||||
- `npm install resolve-url`
 | 
			
		||||
- `bower install resolve-url`
 | 
			
		||||
- `component install lydell/resolve-url`
 | 
			
		||||
 | 
			
		||||
Works with CommonJS, AMD and browser globals, through UMD.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Usage
 | 
			
		||||
=====
 | 
			
		||||
 | 
			
		||||
### `resolveUrl(...urls)` ###
 | 
			
		||||
 | 
			
		||||
Pass one or more urls. Resolves the last one to an absolute url, using the
 | 
			
		||||
previous ones and `window.location`.
 | 
			
		||||
 | 
			
		||||
It’s like starting out on `window.location`, and then clicking links with the
 | 
			
		||||
urls as `href` attributes in order, from left to right.
 | 
			
		||||
 | 
			
		||||
Unlike Node.js’ [`path.resolve`], this function always goes through all of the
 | 
			
		||||
arguments, from left to right. `path.resolve` goes from right to left and only
 | 
			
		||||
in the worst case goes through them all. Should that matter.
 | 
			
		||||
 | 
			
		||||
Actually, the function is _really_ like clicking a lot of links in series: An
 | 
			
		||||
actual `<a>` gets its `href` attribute set for each url! This means that the
 | 
			
		||||
url resolution of the browser is used, which makes this module really
 | 
			
		||||
light-weight.
 | 
			
		||||
 | 
			
		||||
Also note that this functions deals with urls, not paths, so in that respect it
 | 
			
		||||
has more in common with Node.js’ [`url.resolve`]. But the arguments are more
 | 
			
		||||
like [`path.resolve`].
 | 
			
		||||
 | 
			
		||||
[`path.resolve`]: http://nodejs.org/api/path.html#path_path_resolve_from_to
 | 
			
		||||
[`url.resolve`]: http://nodejs.org/api/url.html#url_url_resolve_from_to
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Tests
 | 
			
		||||
=====
 | 
			
		||||
 | 
			
		||||
Run `npm test`, which lints the code and then gives you a link to open in a
 | 
			
		||||
browser of choice (using `testling`).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
License
 | 
			
		||||
=======
 | 
			
		||||
 | 
			
		||||
[The X11 (“MIT”) License](LICENSE).
 | 
			
		||||
							
								
								
									
										47
									
								
								express-server/node_modules/resolve-url/resolve-url.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								express-server/node_modules/resolve-url/resolve-url.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,47 @@
 | 
			
		||||
// Copyright 2014 Simon Lydell
 | 
			
		||||
// X11 (“MIT”) Licensed. (See LICENSE.)
 | 
			
		||||
 | 
			
		||||
void (function(root, factory) {
 | 
			
		||||
  if (typeof define === "function" && define.amd) {
 | 
			
		||||
    define(factory)
 | 
			
		||||
  } else if (typeof exports === "object") {
 | 
			
		||||
    module.exports = factory()
 | 
			
		||||
  } else {
 | 
			
		||||
    root.resolveUrl = factory()
 | 
			
		||||
  }
 | 
			
		||||
}(this, function() {
 | 
			
		||||
 | 
			
		||||
  function resolveUrl(/* ...urls */) {
 | 
			
		||||
    var numUrls = arguments.length
 | 
			
		||||
 | 
			
		||||
    if (numUrls === 0) {
 | 
			
		||||
      throw new Error("resolveUrl requires at least one argument; got none.")
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    var base = document.createElement("base")
 | 
			
		||||
    base.href = arguments[0]
 | 
			
		||||
 | 
			
		||||
    if (numUrls === 1) {
 | 
			
		||||
      return base.href
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    var head = document.getElementsByTagName("head")[0]
 | 
			
		||||
    head.insertBefore(base, head.firstChild)
 | 
			
		||||
 | 
			
		||||
    var a = document.createElement("a")
 | 
			
		||||
    var resolved
 | 
			
		||||
 | 
			
		||||
    for (var index = 1; index < numUrls; index++) {
 | 
			
		||||
      a.href = arguments[index]
 | 
			
		||||
      resolved = a.href
 | 
			
		||||
      base.href = resolved
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    head.removeChild(base)
 | 
			
		||||
 | 
			
		||||
    return resolved
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return resolveUrl
 | 
			
		||||
 | 
			
		||||
}));
 | 
			
		||||
							
								
								
									
										70
									
								
								express-server/node_modules/resolve-url/test/resolve-url.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								express-server/node_modules/resolve-url/test/resolve-url.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,70 @@
 | 
			
		||||
// Copyright 2014 Simon Lydell
 | 
			
		||||
// X11 (“MIT”) Licensed. (See LICENSE.)
 | 
			
		||||
 | 
			
		||||
var test = require("tape")
 | 
			
		||||
 | 
			
		||||
var resolveUrl = require("../")
 | 
			
		||||
 | 
			
		||||
"use strict"
 | 
			
		||||
 | 
			
		||||
test("resolveUrl", function(t) {
 | 
			
		||||
 | 
			
		||||
  t.plan(7)
 | 
			
		||||
 | 
			
		||||
  t.equal(typeof resolveUrl, "function", "is a function")
 | 
			
		||||
 | 
			
		||||
  t.equal(
 | 
			
		||||
    resolveUrl("https://example.com/"),
 | 
			
		||||
    "https://example.com/"
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
  var loc = "https://example.com/articles/resolving-urls/edit"
 | 
			
		||||
 | 
			
		||||
  t.equal(
 | 
			
		||||
    resolveUrl(loc, "remove"),
 | 
			
		||||
    "https://example.com/articles/resolving-urls/remove"
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
  t.equal(
 | 
			
		||||
    resolveUrl(loc, "/static/scripts/app.js"),
 | 
			
		||||
    "https://example.com/static/scripts/app.js"
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
  t.equal(
 | 
			
		||||
    resolveUrl(loc, "/static/scripts/app.js", "../source-maps/app.js.map"),
 | 
			
		||||
    "https://example.com/static/source-maps/app.js.map"
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
  t.equal(
 | 
			
		||||
    resolveUrl(loc, "/static/scripts/app.js", "../source-maps/app.js.map", "../coffee/app.coffee"),
 | 
			
		||||
    "https://example.com/static/coffee/app.coffee"
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
  t.equal(
 | 
			
		||||
    resolveUrl(loc, "//cdn.example.com/jquery.js"),
 | 
			
		||||
    "https://cdn.example.com/jquery.js"
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
test("edge cases", function(t) {
 | 
			
		||||
 | 
			
		||||
  t.plan(4)
 | 
			
		||||
 | 
			
		||||
  t["throws"](resolveUrl, /at least one argument/, "throws with no arguments")
 | 
			
		||||
 | 
			
		||||
  var accidentallyUndefined
 | 
			
		||||
  var result
 | 
			
		||||
  t.doesNotThrow(
 | 
			
		||||
    function() { result = resolveUrl(accidentallyUndefined) },
 | 
			
		||||
    "undefined is still an argument"
 | 
			
		||||
  )
 | 
			
		||||
  t.ok(result.match(/\/undefined$/), "undefined is stringified")
 | 
			
		||||
 | 
			
		||||
  t.equal(
 | 
			
		||||
    resolveUrl("http://foo.org/test", undefined, {}, ["a/b"], null),
 | 
			
		||||
    "http://foo.org/a/null",
 | 
			
		||||
    "arguments are stringified"
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
})
 | 
			
		||||
		Reference in New Issue
	
	Block a user