(_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 = 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…