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

Function validateDictionary

lib/internal/streams/iter/transform.js:97–105  ·  view source on GitHub ↗
(dictionary)

Source from the content-addressed store, hash-verified

95}
96
97function validateDictionary(dictionary) {
98 if (dictionary === undefined) return undefined;
99 if (isArrayBufferView(dictionary)) return dictionary;
100 if (isAnyArrayBuffer(dictionary)) return Buffer.from(dictionary);
101 throw new ERR_INVALID_ARG_TYPE(
102 'options.dictionary',
103 ['Buffer', 'TypedArray', 'DataView', 'ArrayBuffer'],
104 dictionary);
105}
106
107function validateParams(params, maxParam, errClass) {
108 if (params === undefined) return;

Callers 4

constructorMethod · 0.85
createZlibHandleFunction · 0.85
createBrotliHandleFunction · 0.85
createZstdHandleFunction · 0.85

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…