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

Function getHighWaterMark

lib/internal/streams/state.js:33–45  ·  view source on GitHub ↗
(state, options, duplexKey, isDuplex)

Source from the content-addressed store, hash-verified

31}
32
33function getHighWaterMark(state, options, duplexKey, isDuplex) {
34 const hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
35 if (hwm != null) {
36 if (!NumberIsInteger(hwm) || hwm < 0) {
37 const name = isDuplex ? `options.${duplexKey}` : 'options.highWaterMark';
38 throw new ERR_INVALID_ARG_VALUE(name, hwm);
39 }
40 return MathFloor(hwm);
41 }
42
43 // Default value
44 return getDefaultHighWaterMark(state.objectMode);
45}
46
47module.exports = {
48 getHighWaterMark,

Callers 3

WritableStateFunction · 0.85
ReadableStateFunction · 0.85
TransformFunction · 0.85

Calls 2

highWaterMarkFromFunction · 0.85
getDefaultHighWaterMarkFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…