MCPcopy Create free account
hub / github.com/form-data/form-data / FormData

Function FormData

lib/form_data.js:26–41  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

24 * @param {object} options - Properties to be added/overriden for FormData and CombinedStream
25 */
26function 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
44util.inherits(FormData, CombinedStream);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected