(chunk, encoding, callback)
| 132 | |
| 133 | return new Writable({ |
| 134 | write (chunk, encoding, callback) { |
| 135 | if (typeof chunk === 'string') { |
| 136 | chunk = Buffer.from(chunk, encoding) |
| 137 | } |
| 138 | |
| 139 | entry.size += chunk.byteLength |
| 140 | |
| 141 | if (entry.size > store.#maxEntrySize) { |
| 142 | this.destroy() |
| 143 | } else { |
| 144 | entry.body.push(chunk) |
| 145 | } |
| 146 | |
| 147 | callback(null) |
| 148 | }, |
| 149 | final (callback) { |
| 150 | let entries = store.#entries.get(topLevelKey) |
| 151 | if (!entries) { |
no test coverage detected