* Create readable "multipart/form-data" streams. * Can be used to submit forms * and file uploads to other web applications. * * @constructor * @param {object} options - Properties to be added/overriden for FormData and CombinedStream
(options)
| 24 | * @param {object} options - Properties to be added/overriden for FormData and CombinedStream |
| 25 | */ |
| 26 | function FormData(options) { |
| 27 | if (!(this instanceof FormData)) { |
| 28 | return new FormData(options); |
| 29 | } |
| 30 | |
| 31 | this._overheadLength = 0; |
| 32 | this._valueLength = 0; |
| 33 | this._valuesToMeasure = []; |
| 34 | |
| 35 | CombinedStream.call(this); |
| 36 | |
| 37 | options = options || {}; // eslint-disable-line no-param-reassign |
| 38 | for (var option in options) { // eslint-disable-line no-restricted-syntax |
| 39 | this[option] = options[option]; |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | // make it a Stream |
| 44 | util.inherits(FormData, CombinedStream); |
nothing calls this directly
no outgoing calls
no test coverage detected