aboutsummaryrefslogtreecommitdiff
path: root/node_modules/body/parse-arguments.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/body/parse-arguments.js')
-rw-r--r--node_modules/body/parse-arguments.js30
1 files changed, 0 insertions, 30 deletions
diff --git a/node_modules/body/parse-arguments.js b/node_modules/body/parse-arguments.js
deleted file mode 100644
index 5c36ff7..0000000
--- a/node_modules/body/parse-arguments.js
+++ /dev/null
@@ -1,30 +0,0 @@
-module.exports = parseArguments
-
-function isWritable(stream) {
- return typeof stream.write === "function" &&
- typeof stream.end === "function"
-}
-
-function parseArguments(req, res, opts, callback) {
- // (req, cb)
- if (typeof res === "function") {
- callback = res
- opts = {}
- res = null
- }
-
- // (req, res, cb)
- if (typeof opts === "function") {
- callback = opts
- opts = {}
- }
-
- // (req, opts, cb)
- if (res && !isWritable(res)) {
- opts = res
- res = null
- }
-
- // default (req, res, opts, cb)
- return { req: req, res: res, opts: opts, callback: callback }
-}