(_self, _opts)
| 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`) |
| 24 | function 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…