@@ -41,25 +41,25 @@ function isReadableEnded(stream) {
41
41
return rState . endEmitted || ( rState . ended && rState . length === 0 ) ;
42
42
}
43
43
44
- function eos ( stream , opts , callback ) {
44
+ function eos ( stream , options , callback ) {
45
45
if ( arguments . length === 2 ) {
46
- callback = opts ;
47
- opts = { } ;
48
- } else if ( opts == null ) {
49
- opts = { } ;
50
- } else if ( typeof opts !== 'object' ) {
51
- throw new ERR_INVALID_ARG_TYPE ( 'opts ' , 'object' , opts ) ;
46
+ callback = options ;
47
+ options = { } ;
48
+ } else if ( options == null ) {
49
+ options = { } ;
50
+ } else if ( typeof options !== 'object' ) {
51
+ throw new ERR_INVALID_ARG_TYPE ( 'options ' , 'object' , options ) ;
52
52
}
53
53
if ( typeof callback !== 'function' ) {
54
54
throw new ERR_INVALID_ARG_TYPE ( 'callback' , 'function' , callback ) ;
55
55
}
56
56
57
57
callback = once ( callback ) ;
58
58
59
- const readable = opts . readable ||
60
- ( opts . readable !== false && isReadable ( stream ) ) ;
61
- const writable = opts . writable ||
62
- ( opts . writable !== false && isWritable ( stream ) ) ;
59
+ const readable = options . readable ||
60
+ ( options . readable !== false && isReadable ( stream ) ) ;
61
+ const writable = options . writable ||
62
+ ( options . writable !== false && isWritable ( stream ) ) ;
63
63
64
64
const wState = stream . _writableState ;
65
65
const rState = stream . _readableState ;
@@ -144,7 +144,7 @@ function eos(stream, opts, callback) {
144
144
145
145
stream . on ( 'end' , onend ) ;
146
146
stream . on ( 'finish' , onfinish ) ;
147
- if ( opts . error !== false ) stream . on ( 'error' , onerror ) ;
147
+ if ( options . error !== false ) stream . on ( 'error' , onerror ) ;
148
148
stream . on ( 'close' , onclose ) ;
149
149
150
150
const closed = (
0 commit comments