MCPcopy
hub / github.com/node-formidable/formidable / init

Function init

src/plugins/querystring.js:24–41  ·  view source on GitHub ↗
(_self, _opts)

Source from the content-addressed store, hash-verified

22// of the passed `options` (second) param, because when you decide
23// to test the plugin you can pass custom `this` context to it (and so `this.options`)
24function init(_self, _opts) {
25 this.type = querystringType;
26
27 const parser = new QuerystringParser(this.options);
28
29 parser.on('data', ({ key, value }) => {
30 this.emit('field', key, value);
31 });
32
33 parser.once('end', () => {
34 this.ended = true;
35 this._maybeEnd();
36 });
37
38 this._parser = parser;
39
40 return this;
41}

Callers

nothing calls this directly

Calls 1

_maybeEndMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…