PHP 8.2.30
Preview: state.js Size: 745 B
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/readable-stream/lib/internal/streams/state.js

'use strict';

var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;
function highWaterMarkFrom(options, isDuplex, duplexKey) {
  return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
}
function getHighWaterMark(state, options, duplexKey, isDuplex) {
  var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
  if (hwm != null) {
    if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
      var name = isDuplex ? duplexKey : 'highWaterMark';
      throw new ERR_INVALID_OPT_VALUE(name, hwm);
    }
    return Math.floor(hwm);
  }

  // Default value
  return state.objectMode ? 16 : 16 * 1024;
}
module.exports = {
  getHighWaterMark: getHighWaterMark
};

Directory Contents

Dirs: 0 × Files: 10

Name Size Perms Modified Actions
6.32 KB lrw-r--r-- 2026-02-21 00:53:30
Edit Download
6.74 KB lrw-r--r-- 2026-02-21 00:53:32
Edit Download
3.04 KB lrw-r--r-- 2026-02-21 00:53:34
Edit Download
3.01 KB lrw-r--r-- 2026-02-21 00:53:34
Edit Download
101 B lrw-r--r-- 2026-02-21 00:53:36
Edit Download
3.58 KB lrw-r--r-- 2026-02-21 00:53:38
Edit Download
2.36 KB lrw-r--r-- 2026-02-21 00:53:38
Edit Download
745 B lrw-r--r-- 2026-02-21 00:53:40
Edit Download
49 B lrw-r--r-- 2026-02-21 00:53:42
Edit Download
36 B lrw-r--r-- 2026-02-21 00:53:42
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).