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

Function extractHighWaterMark

lib/internal/webstreams/util.js:65–72  ·  view source on GitHub ↗
(value, defaultHWM)

Source from the content-addressed store, hash-verified

63};
64
65function extractHighWaterMark(value, defaultHWM) {
66 if (value === undefined) return defaultHWM;
67 const coercedValue = +value;
68 if (NumberIsNaN(coercedValue) ||
69 coercedValue < 0)
70 throw new ERR_INVALID_ARG_VALUE.RangeError('strategy.highWaterMark', value);
71 return coercedValue;
72}
73
74// The default size algorithm is never exposed to user code, so a single
75// shared function avoids one closure allocation per stream.

Callers 3

constructorMethod · 0.85
constructorMethod · 0.85
constructorMethod · 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…