Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified build/build.js
100644 → 100755
Empty file.
7 changes: 6 additions & 1 deletion build/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,13 @@ function CorkedRequest(state) {
'const { emitExperimentalWarning } = require(\'../experimentalWarning\');'
]
, numberIE11 = [
/Number.isNaN\(n\)/g
/Number\.isNaN\(n\)/g
, 'n !== n'
]
, integerIE11 = [
/Number\.isInteger\(hwm\)/g
, '(isFinite(hwm) && Math.floor(hwm) === hwm)'
]
, noAsyncIterators1 = [
/Readable\.prototype\[Symbol\.asyncIterator\] = function\(\) \{/g
, 'if (typeof Symbol === \'function\' ) {\nReadable.prototype[Symbol.asyncIterator] = function () {'
Expand Down Expand Up @@ -313,6 +317,7 @@ module.exports['internal/streams/destroy.js'] = [

module.exports['internal/streams/state.js'] = [
, errorsTwoLevel
, integerIE11
]

module.exports['internal/streams/async_iterator.js'] = [
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/streams/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function highWaterMarkFrom(options, isDuplex, duplexKey) {
function getHighWaterMark(state, options, duplexKey, isDuplex) {
var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
if (hwm != null) {
if (!Number.isInteger(hwm) || hwm < 0) {
if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
var name = isDuplex ? duplexKey : 'highWaterMark';
throw new ERR_INVALID_OPT_VALUE(name, hwm);
}
Expand Down