(done)
| 68 | } |
| 69 | |
| 70 | _flush(done) { |
| 71 | if ( |
| 72 | (this.state === STATE.HEADER_FIELD_START && this.index === 0) || |
| 73 | (this.state === STATE.PART_DATA && this.index === this.boundary.length) |
| 74 | ) { |
| 75 | this._handleCallback('partEnd'); |
| 76 | this._handleCallback('end'); |
| 77 | done(); |
| 78 | } else if (this.state !== STATE.END) { |
| 79 | done(this._endUnexpected()); |
| 80 | } else { |
| 81 | done(); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | initWithBoundary(str) { |
| 86 | this.boundary = Buffer.from(`\r\n--${str}`); |
nothing calls this directly
no test coverage detected