docs:更新文档

This commit is contained in:
张益铭
2021-03-01 15:06:11 +08:00
parent 1542135ab0
commit 9064b372e8
5835 changed files with 904126 additions and 161722 deletions

16
node_modules/koa-conditional-get/History.md generated vendored Normal file
View File

@@ -0,0 +1,16 @@
2.0.0 / 2016-03-20
==================
* Koa 2: Upgrade to be a modern, promise-based (ctx, next) middleware
1.0.2 / 2014-04-06
==================
* update middleware signature
* use `yield* next`
1.0.1 / 2013-12-23
==================
* fix middleware not returning generator function

21
node_modules/koa-conditional-get/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Koa.js contributors
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.

53
node_modules/koa-conditional-get/README.md generated vendored Normal file
View File

@@ -0,0 +1,53 @@
# koa-conditional-get
[![Build Status](https://travis-ci.org/koajs/conditional-get.png)](https://travis-ci.org/koajs/conditional-get)
Conditional GET support for koa.
## Installation
```bash
# npm
$ npm install koa-conditional-get
# yarn
$ yarn add koa-conditional-get
```
## Example
```js
const conditional = require('koa-conditional-get');
const etag = require('koa-etag');
const Koa = require('koa');
const app = new Koa();
// use it upstream from etag so
// that they are present
app.use(conditional());
// add etags
app.use(etag());
// respond
app.use(async function(ctx, next){
await next();
ctx.body = {
name: 'tobi',
species: 'ferret',
age: 2
};
})
app.listen(
3000,
console.log('listening on port 3000')
)
```
## License
[MIT](LICENSE)

22
node_modules/koa-conditional-get/index.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
'use strict'
/**
* Expose `conditional`.
*
* Conditional GET support middleware.
*
* @return {Function}
* @api public
*/
module.exports = function conditional () {
return async function (ctx, next) {
await next()
if (ctx.fresh) {
ctx.status = 304
ctx.body = null
}
}
}

78
node_modules/koa-conditional-get/package.json generated vendored Normal file
View File

@@ -0,0 +1,78 @@
{
"_args": [
[
"koa-conditional-get@3.0.0",
"J:\\Github\\CURD-TS"
]
],
"_development": true,
"_from": "koa-conditional-get@3.0.0",
"_id": "koa-conditional-get@3.0.0",
"_inBundle": false,
"_integrity": "sha1-VSy2SiF9+5B+kLfDT0IAnkQcS44=",
"_location": "/koa-conditional-get",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "koa-conditional-get@3.0.0",
"name": "koa-conditional-get",
"escapedName": "koa-conditional-get",
"rawSpec": "3.0.0",
"saveSpec": null,
"fetchSpec": "3.0.0"
},
"_requiredBy": [
"/vite"
],
"_resolved": "http://192.168.250.101:4873/koa-conditional-get/-/koa-conditional-get-3.0.0.tgz",
"_spec": "3.0.0",
"_where": "J:\\Github\\CURD-TS",
"bugs": {
"url": "https://github.com/koajs/conditional-get/issues"
},
"description": "Conditional GET support for koa",
"devDependencies": {
"eslint": "^6.8.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"etag": "^1.8.1",
"koa": "^2.13.0",
"koa-etag": "^4.0.0",
"mocha": "^8.1.3",
"nyc": "^15.1.0",
"rimraf": "^3.0.2",
"supertest": "^4.0.2"
},
"enignes": {
"node": ">= 10"
},
"files": [
"index.js"
],
"homepage": "https://github.com/koajs/conditional-get#readme",
"keywords": [
"koa",
"middleware",
"cache",
"caching",
"etag"
],
"license": "MIT",
"name": "koa-conditional-get",
"repository": {
"type": "git",
"url": "git+https://github.com/koajs/conditional-get.git"
},
"scripts": {
"ci": "npm run lint && npm run cov",
"cov": "nyc npm run test",
"lint": "eslint .",
"precov": "rimraf .nyc_output coverage",
"test": "mocha --exit"
},
"version": "3.0.0"
}