@@ -44,13 +44,13 @@ module.exports = function (opts) {
44
44
function write ( row , enc , next ) {
45
45
if ( first && opts . standalone ) {
46
46
var pre = umd . prelude ( opts . standalone ) . trim ( ) ;
47
- stream . push ( Buffer ( pre + 'return ' ) ) ;
47
+ stream . push ( new Buffer ( pre + 'return ' ) ) ;
48
48
}
49
49
else if ( first && stream . hasExports ) {
50
50
var pre = opts . externalRequireName || 'require' ;
51
- stream . push ( Buffer ( pre + '=' ) ) ;
51
+ stream . push ( new Buffer ( pre + '=' ) ) ;
52
52
}
53
- if ( first ) stream . push ( Buffer ( prelude + '({' ) ) ;
53
+ if ( first ) stream . push ( new Buffer ( prelude + '({' ) ) ;
54
54
55
55
if ( row . sourceFile && ! row . nomap ) {
56
56
if ( ! sourcemap ) {
@@ -81,7 +81,7 @@ module.exports = function (opts) {
81
81
']'
82
82
] . join ( '' ) ;
83
83
84
- stream . push ( Buffer ( wrappedSource ) ) ;
84
+ stream . push ( new Buffer ( wrappedSource ) ) ;
85
85
lineno += newlinesIn ( wrappedSource ) ;
86
86
87
87
first = false ;
@@ -93,13 +93,13 @@ module.exports = function (opts) {
93
93
}
94
94
95
95
function end ( ) {
96
- if ( first ) stream . push ( Buffer ( prelude + '({' ) ) ;
96
+ if ( first ) stream . push ( new Buffer ( prelude + '({' ) ) ;
97
97
entries = entries . filter ( function ( x ) { return x !== undefined } ) ;
98
98
99
- stream . push ( Buffer ( '},{},' + JSON . stringify ( entries ) + ')' ) ) ;
99
+ stream . push ( new Buffer ( '},{},' + JSON . stringify ( entries ) + ')' ) ) ;
100
100
101
101
if ( opts . standalone && ! first ) {
102
- stream . push ( Buffer (
102
+ stream . push ( new Buffer (
103
103
'(' + JSON . stringify ( stream . standaloneModule ) + ')'
104
104
+ umd . postlude ( opts . standalone )
105
105
) ) ;
@@ -112,9 +112,9 @@ module.exports = function (opts) {
112
112
/ ^ \/ \/ # / , function ( ) { return opts . sourceMapPrefix }
113
113
)
114
114
}
115
- stream . push ( Buffer ( '\n' + comment + '\n' ) ) ;
115
+ stream . push ( new Buffer ( '\n' + comment + '\n' ) ) ;
116
116
}
117
- if ( ! sourcemap && ! opts . standalone ) stream . push ( Buffer ( ';\n' ) ) ;
117
+ if ( ! sourcemap && ! opts . standalone ) stream . push ( new Buffer ( ';\n' ) ) ;
118
118
119
119
stream . push ( null ) ;
120
120
}
0 commit comments