From 44d61e40e835725b8a7b01befb3faa510b831306 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Fri, 19 Nov 2021 19:25:49 +0100 Subject: [PATCH] fixup --- lib/internal/streams/legacy.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/internal/streams/legacy.js b/lib/internal/streams/legacy.js index 483f9b08fc1c23..d3785ea0ab924d 100644 --- a/lib/internal/streams/legacy.js +++ b/lib/internal/streams/legacy.js @@ -2,8 +2,8 @@ const { ArrayIsArray, + ObjectDefineProperty, ObjectSetPrototypeOf, - MathMax, NumberIsInteger, } = primordials; const { @@ -13,7 +13,6 @@ const { } } = require('internal/errors'); -const { Buffer } = require('buffer'); const EE = require('events'); function Stream(opts) { @@ -122,10 +121,10 @@ function prependListener(emitter, event, fn) { let defaultHighWaterMark = 16 * 1024; ObjectDefineProperty(Stream, 'defaultHighWaterMark', { - get () { + get() { return defaultHighWaterMark; }, - set (value) { + set(value) { if (!NumberIsInteger(value)) { throw ERR_INVALID_ARG_TYPE('value', 'Integer', value); } @@ -140,10 +139,10 @@ ObjectDefineProperty(Stream, 'defaultHighWaterMark', { let defaultObjectModeHighWaterMark = 16; ObjectDefineProperty(Stream, 'defaultObjectModeHighWaterMark', { - get () { + get() { return defaultObjectModeHighWaterMark; }, - set (value) { + set(value) { if (!NumberIsInteger(value)) { throw ERR_INVALID_ARG_TYPE('value', 'Integer', value); }