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

Function parseInput

lib/internal/encoding.js:394–410  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

392 });
393
394function parseInput(input) {
395 if (isAnyArrayBuffer(input)) {
396 try {
397 return new FastBuffer(input);
398 } catch {
399 return empty;
400 }
401 } else if (isArrayBufferView(input)) {
402 try {
403 return new FastBuffer(input.buffer, input.byteOffset, input.byteLength);
404 } catch {
405 return empty;
406 }
407 } else {
408 throw new ERR_INVALID_ARG_TYPE('input', ['ArrayBuffer', 'ArrayBufferView'], input);
409 }
410}
411
412let icuDecode, icuGetConverter;
413if (hasIntl) {

Callers 1

decodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…