Detailansicht verbessert
This commit is contained in:
		
							
								
								
									
										21
									
								
								express-server/node_modules/use/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								express-server/node_modules/use/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
The MIT License (MIT)
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2015-present, Jon Schlinkert.
 | 
			
		||||
 | 
			
		||||
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.
 | 
			
		||||
							
								
								
									
										90
									
								
								express-server/node_modules/use/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										90
									
								
								express-server/node_modules/use/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,90 @@
 | 
			
		||||
# use [](https://www.npmjs.com/package/use) [](https://npmjs.org/package/use) [](https://npmjs.org/package/use) [](https://travis-ci.org/jonschlinkert/use)
 | 
			
		||||
 | 
			
		||||
> Easily add plugin support to your node.js application.
 | 
			
		||||
 | 
			
		||||
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
 | 
			
		||||
 | 
			
		||||
## Install
 | 
			
		||||
 | 
			
		||||
Install with [npm](https://www.npmjs.com/):
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
$ npm install --save use
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
A different take on plugin handling! This is not a middleware system, if you need something that handles async middleware, [ware](https://github.com/segmentio/ware) is great for that.
 | 
			
		||||
 | 
			
		||||
## Usage
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
const use = require('use');
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
See the [examples folder](./examples) for usage examples.
 | 
			
		||||
 | 
			
		||||
## About
 | 
			
		||||
 | 
			
		||||
<details>
 | 
			
		||||
<summary><strong>Contributing</strong></summary>
 | 
			
		||||
 | 
			
		||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
 | 
			
		||||
 | 
			
		||||
</details>
 | 
			
		||||
 | 
			
		||||
<details>
 | 
			
		||||
<summary><strong>Running Tests</strong></summary>
 | 
			
		||||
 | 
			
		||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
$ npm install && npm test
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
</details>
 | 
			
		||||
 | 
			
		||||
<details>
 | 
			
		||||
<summary><strong>Building docs</strong></summary>
 | 
			
		||||
 | 
			
		||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
 | 
			
		||||
 | 
			
		||||
To generate the readme, run the following command:
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
</details>
 | 
			
		||||
 | 
			
		||||
### Related projects
 | 
			
		||||
 | 
			
		||||
You might also be interested in these projects:
 | 
			
		||||
 | 
			
		||||
* [base-plugins](https://www.npmjs.com/package/base-plugins): Adds 'smart plugin' support to your base application. | [homepage](https://github.com/node-base/base-plugins "Adds 'smart plugin' support to your base application.")
 | 
			
		||||
* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks")
 | 
			
		||||
* [ware](https://www.npmjs.com/package/ware): Easily create your own middleware layer. | [homepage](https://github.com/segmentio/ware "Easily create your own middleware layer.")
 | 
			
		||||
 | 
			
		||||
### Contributors
 | 
			
		||||
 | 
			
		||||
| **Commits** | **Contributor** | 
 | 
			
		||||
| --- | --- |
 | 
			
		||||
| 37 | [jonschlinkert](https://github.com/jonschlinkert) |
 | 
			
		||||
| 7 | [charlike-old](https://github.com/charlike-old) |
 | 
			
		||||
| 2 | [doowb](https://github.com/doowb) |
 | 
			
		||||
| 2 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
 | 
			
		||||
 | 
			
		||||
### Author
 | 
			
		||||
 | 
			
		||||
**Jon Schlinkert**
 | 
			
		||||
 | 
			
		||||
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
 | 
			
		||||
* [GitHub Profile](https://github.com/jonschlinkert)
 | 
			
		||||
* [Twitter Profile](https://twitter.com/jonschlinkert)
 | 
			
		||||
 | 
			
		||||
### License
 | 
			
		||||
 | 
			
		||||
Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
 | 
			
		||||
Released under the [MIT License](LICENSE).
 | 
			
		||||
 | 
			
		||||
***
 | 
			
		||||
 | 
			
		||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 12, 2018._
 | 
			
		||||
							
								
								
									
										155
									
								
								express-server/node_modules/use/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										155
									
								
								express-server/node_modules/use/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,155 @@
 | 
			
		||||
/*!
 | 
			
		||||
 * use <https://github.com/jonschlinkert/use>
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (c) 2015-2017, Jon Schlinkert.
 | 
			
		||||
 * Released under the MIT License.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
module.exports = function base(app, options) {
 | 
			
		||||
  if (!isObject(app) && typeof app !== 'function') {
 | 
			
		||||
    throw new TypeError('expected an object or function');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  var opts = isObject(options) ? options : {};
 | 
			
		||||
  var prop = typeof opts.prop === 'string' ? opts.prop : 'fns';
 | 
			
		||||
  if (!Array.isArray(app[prop])) {
 | 
			
		||||
    define(app, prop, []);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Define a plugin function to be passed to use. The only
 | 
			
		||||
   * parameter exposed to the plugin is `app`, the object or function.
 | 
			
		||||
   * passed to `use(app)`. `app` is also exposed as `this` in plugins.
 | 
			
		||||
   *
 | 
			
		||||
   * Additionally, **if a plugin returns a function, the function will
 | 
			
		||||
   * be pushed onto the `fns` array**, allowing the plugin to be
 | 
			
		||||
   * called at a later point by the `run` method.
 | 
			
		||||
   *
 | 
			
		||||
   * ```js
 | 
			
		||||
   * var use = require('use');
 | 
			
		||||
   *
 | 
			
		||||
   * // define a plugin
 | 
			
		||||
   * function foo(app) {
 | 
			
		||||
   *   // do stuff
 | 
			
		||||
   * }
 | 
			
		||||
   *
 | 
			
		||||
   * var app = function(){};
 | 
			
		||||
   * use(app);
 | 
			
		||||
   *
 | 
			
		||||
   * // register plugins
 | 
			
		||||
   * app.use(foo);
 | 
			
		||||
   * app.use(bar);
 | 
			
		||||
   * app.use(baz);
 | 
			
		||||
   * ```
 | 
			
		||||
   * @name .use
 | 
			
		||||
   * @param {Function} `fn` plugin function to call
 | 
			
		||||
   * @api public
 | 
			
		||||
   */
 | 
			
		||||
 | 
			
		||||
  define(app, 'use', use);
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Run all plugins on `fns`. Any plugin that returns a function
 | 
			
		||||
   * when called by `use` is pushed onto the `fns` array.
 | 
			
		||||
   *
 | 
			
		||||
   * ```js
 | 
			
		||||
   * var config = {};
 | 
			
		||||
   * app.run(config);
 | 
			
		||||
   * ```
 | 
			
		||||
   * @name .run
 | 
			
		||||
   * @param {Object} `value` Object to be modified by plugins.
 | 
			
		||||
   * @return {Object} Returns the object passed to `run`
 | 
			
		||||
   * @api public
 | 
			
		||||
   */
 | 
			
		||||
 | 
			
		||||
  define(app, 'run', function(val) {
 | 
			
		||||
    if (!isObject(val)) return;
 | 
			
		||||
 | 
			
		||||
    if (!val.use || !val.run) {
 | 
			
		||||
      define(val, prop, val[prop] || []);
 | 
			
		||||
      define(val, 'use', use);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!val[prop] || val[prop].indexOf(base) === -1) {
 | 
			
		||||
      val.use(base);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    var self = this || app;
 | 
			
		||||
    var fns = self[prop];
 | 
			
		||||
    var len = fns.length;
 | 
			
		||||
    var idx = -1;
 | 
			
		||||
 | 
			
		||||
    while (++idx < len) {
 | 
			
		||||
      val.use(fns[idx]);
 | 
			
		||||
    }
 | 
			
		||||
    return val;
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Call plugin `fn`. If a function is returned push it into the
 | 
			
		||||
   * `fns` array to be called by the `run` method.
 | 
			
		||||
   */
 | 
			
		||||
 | 
			
		||||
  function use(type, fn, options) {
 | 
			
		||||
    var offset = 1;
 | 
			
		||||
 | 
			
		||||
    if (typeof type === 'string' || Array.isArray(type)) {
 | 
			
		||||
      fn = wrap(type, fn);
 | 
			
		||||
      offset++;
 | 
			
		||||
    } else {
 | 
			
		||||
      options = fn;
 | 
			
		||||
      fn = type;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (typeof fn !== 'function') {
 | 
			
		||||
      throw new TypeError('expected a function');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    var self = this || app;
 | 
			
		||||
    var fns = self[prop];
 | 
			
		||||
 | 
			
		||||
    var args = [].slice.call(arguments, offset);
 | 
			
		||||
    args.unshift(self);
 | 
			
		||||
 | 
			
		||||
    if (typeof opts.hook === 'function') {
 | 
			
		||||
      opts.hook.apply(self, args);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    var val = fn.apply(self, args);
 | 
			
		||||
    if (typeof val === 'function' && fns.indexOf(val) === -1) {
 | 
			
		||||
      fns.push(val);
 | 
			
		||||
    }
 | 
			
		||||
    return self;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Wrap a named plugin function so that it's only called on objects of the
 | 
			
		||||
   * given `type`
 | 
			
		||||
   *
 | 
			
		||||
   * @param {String} `type`
 | 
			
		||||
   * @param {Function} `fn` Plugin function
 | 
			
		||||
   * @return {Function}
 | 
			
		||||
   */
 | 
			
		||||
 | 
			
		||||
  function wrap(type, fn) {
 | 
			
		||||
    return function plugin() {
 | 
			
		||||
      return this.type === type ? fn.apply(this, arguments) : plugin;
 | 
			
		||||
    };
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return app;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
function isObject(val) {
 | 
			
		||||
  return val && typeof val === 'object' && !Array.isArray(val);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function define(obj, key, val) {
 | 
			
		||||
  Object.defineProperty(obj, key, {
 | 
			
		||||
    configurable: true,
 | 
			
		||||
    writable: true,
 | 
			
		||||
    value: val
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										108
									
								
								express-server/node_modules/use/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										108
									
								
								express-server/node_modules/use/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,108 @@
 | 
			
		||||
{
 | 
			
		||||
  "_from": "use@^3.1.0",
 | 
			
		||||
  "_id": "use@3.1.1",
 | 
			
		||||
  "_inBundle": false,
 | 
			
		||||
  "_integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
 | 
			
		||||
  "_location": "/use",
 | 
			
		||||
  "_phantomChildren": {},
 | 
			
		||||
  "_requested": {
 | 
			
		||||
    "type": "range",
 | 
			
		||||
    "registry": true,
 | 
			
		||||
    "raw": "use@^3.1.0",
 | 
			
		||||
    "name": "use",
 | 
			
		||||
    "escapedName": "use",
 | 
			
		||||
    "rawSpec": "^3.1.0",
 | 
			
		||||
    "saveSpec": null,
 | 
			
		||||
    "fetchSpec": "^3.1.0"
 | 
			
		||||
  },
 | 
			
		||||
  "_requiredBy": [
 | 
			
		||||
    "/snapdragon"
 | 
			
		||||
  ],
 | 
			
		||||
  "_resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
 | 
			
		||||
  "_shasum": "d50c8cac79a19fbc20f2911f56eb973f4e10070f",
 | 
			
		||||
  "_spec": "use@^3.1.0",
 | 
			
		||||
  "_where": "D:\\5CHITM\\Diplomarbeit\\SmartShopper\\SmartShopper\\express-server\\node_modules\\snapdragon",
 | 
			
		||||
  "author": {
 | 
			
		||||
    "name": "Jon Schlinkert",
 | 
			
		||||
    "url": "https://github.com/jonschlinkert"
 | 
			
		||||
  },
 | 
			
		||||
  "bugs": {
 | 
			
		||||
    "url": "https://github.com/jonschlinkert/use/issues"
 | 
			
		||||
  },
 | 
			
		||||
  "bundleDependencies": false,
 | 
			
		||||
  "contributors": [
 | 
			
		||||
    {
 | 
			
		||||
      "name": "Brian Woodward",
 | 
			
		||||
      "url": "https://twitter.com/doowb"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "Jon Schlinkert",
 | 
			
		||||
      "url": "http://twitter.com/jonschlinkert"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "Olsten Larck",
 | 
			
		||||
      "url": "https://i.am.charlike.online"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "url": "https://github.com/wtgtybhertgeghgtwtg"
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "deprecated": false,
 | 
			
		||||
  "description": "Easily add plugin support to your node.js application.",
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "base-plugins": "^1.0.0",
 | 
			
		||||
    "define-property": "^2.0.0",
 | 
			
		||||
    "extend-shallow": "^3.0.1",
 | 
			
		||||
    "gulp": "^3.9.1",
 | 
			
		||||
    "gulp-eslint": "^4.0.0",
 | 
			
		||||
    "gulp-format-md": "^1.0.0",
 | 
			
		||||
    "gulp-istanbul": "^1.1.2",
 | 
			
		||||
    "gulp-mocha": "^3.0.1",
 | 
			
		||||
    "mocha": "^4.0.1"
 | 
			
		||||
  },
 | 
			
		||||
  "engines": {
 | 
			
		||||
    "node": ">=0.10.0"
 | 
			
		||||
  },
 | 
			
		||||
  "files": [
 | 
			
		||||
    "index.js"
 | 
			
		||||
  ],
 | 
			
		||||
  "homepage": "https://github.com/jonschlinkert/use",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "use"
 | 
			
		||||
  ],
 | 
			
		||||
  "license": "MIT",
 | 
			
		||||
  "main": "index.js",
 | 
			
		||||
  "name": "use",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
    "url": "git+https://github.com/jonschlinkert/use.git"
 | 
			
		||||
  },
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "test": "mocha"
 | 
			
		||||
  },
 | 
			
		||||
  "verb": {
 | 
			
		||||
    "toc": false,
 | 
			
		||||
    "layout": "default",
 | 
			
		||||
    "tasks": [
 | 
			
		||||
      "readme"
 | 
			
		||||
    ],
 | 
			
		||||
    "plugins": [
 | 
			
		||||
      "gulp-format-md"
 | 
			
		||||
    ],
 | 
			
		||||
    "related": {
 | 
			
		||||
      "list": [
 | 
			
		||||
        "base",
 | 
			
		||||
        "base-plugins",
 | 
			
		||||
        "ware"
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "reflinks": [
 | 
			
		||||
      "verb",
 | 
			
		||||
      "ware"
 | 
			
		||||
    ],
 | 
			
		||||
    "lint": {
 | 
			
		||||
      "reflinks": true
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "version": "3.1.1"
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user