File tree 1 file changed +2
-9
lines changed
1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,6 @@ const disallowedTypeCharacters = /[^\u{0020}-\u{007E}]/u;
75
75
76
76
let ReadableStream ;
77
77
let URL ;
78
- let EOL ;
79
78
80
79
const enc = new TextEncoder ( ) ;
81
80
@@ -94,13 +93,7 @@ function lazyReadableStream(options) {
94
93
return new ReadableStream ( options ) ;
95
94
}
96
95
97
- // TODO(@jasnell): This is annoying but this has to be lazy because
98
- // requiring the 'os' module too early causes building Node.js to
99
- // fail with an unknown reference failure.
100
- function lazyEOL ( ) {
101
- EOL ??= require ( 'os' ) . EOL ;
102
- return EOL ;
103
- }
96
+ const { EOL } = require ( 'internal/constants' ) ;
104
97
105
98
function isBlob ( object ) {
106
99
return object ?. [ kHandle ] !== undefined ;
@@ -115,7 +108,7 @@ function getSource(source, endings) {
115
108
} else if ( ! isArrayBufferView ( source ) ) {
116
109
source = `${ source } ` ;
117
110
if ( endings === 'native' )
118
- source = RegExpPrototypeSymbolReplace ( / \n | \r \n / g, source , lazyEOL ( ) ) ;
111
+ source = RegExpPrototypeSymbolReplace ( / \n | \r \n / g, source , EOL ) ;
119
112
source = enc . encode ( source ) ;
120
113
}
121
114
You can’t perform that action at this time.
0 commit comments