From 26105034da4fcce7ac883c899d781f016559310d Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 8 Nov 2018 00:38:48 +0800 Subject: switch to vuepress --- node_modules/koa-is-json/.npmignore | 58 +++++++++++++++++++++++++++++++++++ node_modules/koa-is-json/LICENSE | 22 +++++++++++++ node_modules/koa-is-json/README.md | 3 ++ node_modules/koa-is-json/index.js | 14 +++++++++ node_modules/koa-is-json/package.json | 13 ++++++++ 5 files changed, 110 insertions(+) create mode 100644 node_modules/koa-is-json/.npmignore create mode 100644 node_modules/koa-is-json/LICENSE create mode 100644 node_modules/koa-is-json/README.md create mode 100644 node_modules/koa-is-json/index.js create mode 100644 node_modules/koa-is-json/package.json (limited to 'node_modules/koa-is-json') diff --git a/node_modules/koa-is-json/.npmignore b/node_modules/koa-is-json/.npmignore new file mode 100644 index 00000000..7cb60ed8 --- /dev/null +++ b/node_modules/koa-is-json/.npmignore @@ -0,0 +1,58 @@ +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite + +# OS generated files # +###################### +.DS_Store* +ehthumbs.db +Icon? +Thumbs.db + +# Node.js # +########### +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +node_modules +npm-debug.log + +# Components # +############## + +/build +/components diff --git a/node_modules/koa-is-json/LICENSE b/node_modules/koa-is-json/LICENSE new file mode 100644 index 00000000..a7ae8ee9 --- /dev/null +++ b/node_modules/koa-is-json/LICENSE @@ -0,0 +1,22 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com + +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. diff --git a/node_modules/koa-is-json/README.md b/node_modules/koa-is-json/README.md new file mode 100644 index 00000000..540f0540 --- /dev/null +++ b/node_modules/koa-is-json/README.md @@ -0,0 +1,3 @@ +# Koa Is JSON + +Check if a body is JSON diff --git a/node_modules/koa-is-json/index.js b/node_modules/koa-is-json/index.js new file mode 100644 index 00000000..40ca7694 --- /dev/null +++ b/node_modules/koa-is-json/index.js @@ -0,0 +1,14 @@ + +module.exports = isJSON; + +/** + * Check if `body` should be interpreted as json. + */ + +function isJSON(body) { + if (!body) return false; + if ('string' == typeof body) return false; + if ('function' == typeof body.pipe) return false; + if (Buffer.isBuffer(body)) return false; + return true; +} diff --git a/node_modules/koa-is-json/package.json b/node_modules/koa-is-json/package.json new file mode 100644 index 00000000..2791e687 --- /dev/null +++ b/node_modules/koa-is-json/package.json @@ -0,0 +1,13 @@ +{ + "name": "koa-is-json", + "description": "check if a koa body should be interpreted as JSON", + "version": "1.0.0", + "author": { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com", + "twitter": "https://twitter.com/jongleberry" + }, + "license": "MIT", + "repository": "koajs/is-json" +} -- cgit v1.2.3