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

Function init

src/plugins/json.js:24–39  ·  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 = jsonType;
26
27 const parser = new JSONParser(this.options);
28
29 parser.on('data', (fields) => {
30 this.fields = fields;
31 });
32
33 parser.once('end', () => {
34 this.ended = true;
35 this._maybeEnd();
36 });
37
38 this._parser = parser;
39}

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…