1
0
Fork 0
forked from svrjs/svrjs
This repository has been archived on 2024-11-10. You can view files and clone it, but cannot push or open issues or pull requests.
svrjs/node_modules/formidable/src/parsers/Dummy.js
2023-07-29 20:33:28 +02:00

21 lines
424 B
JavaScript

/* 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;