summaryrefslogtreecommitdiff
path: root/together/node_modules/formidable/src/parsers/Dummy.js
diff options
context:
space:
mode:
Diffstat (limited to 'together/node_modules/formidable/src/parsers/Dummy.js')
-rw-r--r--together/node_modules/formidable/src/parsers/Dummy.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/together/node_modules/formidable/src/parsers/Dummy.js b/together/node_modules/formidable/src/parsers/Dummy.js
new file mode 100644
index 0000000..6340959
--- /dev/null
+++ b/together/node_modules/formidable/src/parsers/Dummy.js
@@ -0,0 +1,21 @@
+/* eslint-disable no-underscore-dangle */
+
+'use strict';
+
+const { Transform } = require('stream');
+
+class DummyParser extends Transform {
+ constructor(incomingForm, options = {}) {
+ super();
+ this.globalOptions = { ...options };
+ this.incomingForm = incomingForm;
+ }
+
+ _flush(callback) {
+ this.incomingForm.ended = true;
+ this.incomingForm._maybeEnd();
+ callback();
+ }
+}
+
+module.exports = DummyParser;