MCPcopy Index your code
hub / github.com/nodejs/node / getDecoder

Function getDecoder

lib/internal/crypto/cipher.js:94–104  ·  view source on GitHub ↗
(decoder, encoding)

Source from the content-addressed store, hash-verified

92 'private');
93
94function 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
106function getUIntOption(options, key) {
107 let value;

Callers 2

updateFunction · 0.85
finalFunction · 0.85

Calls 2

normalizeEncodingFunction · 0.85
failMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…