(decoder, encoding)
| 92 | 'private'); |
| 93 | |
| 94 | function getDecoder(decoder, encoding) { |
| 95 | const normalizedEncoding = normalizeEncoding(encoding); |
| 96 | decoder ||= new StringDecoder(encoding); |
| 97 | if (decoder.encoding !== normalizedEncoding) { |
| 98 | if (normalizedEncoding === undefined) { |
| 99 | throw new ERR_UNKNOWN_ENCODING(encoding); |
| 100 | } |
| 101 | assert.fail('Cannot change encoding'); |
| 102 | } |
| 103 | return decoder; |
| 104 | } |
| 105 | |
| 106 | function getUIntOption(options, key) { |
| 107 | let value; |
no test coverage detected
searching dependent graphs…