Skip to content

Commit 463b5d5

Browse files
committed
rm unneded regex
1 parent a685b1c commit 463b5d5

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

build/files.js

+1-15
Original file line numberDiff line numberDiff line change
@@ -175,20 +175,7 @@ const headRegexp = /(^module.exports = \w+;?)/m
175175
/require\('internal\/streams\/BufferList'\)/,
176176
'require(\'./internal/streams/BufferList\')'
177177
]
178-
, prependFix = [
179-
/var prependListener;\n(?:.|\n)+\[fn, emitter\._events\[event]];\n\s\s};\n}/m,
180-
`function prependListener(emitter, event, fn) {
181-
if (typeof emitter.prependListener === 'function') {
182-
return emitter.prependListener(event, fn);
183-
} else {
184-
// This is a hack to make sure that our error handler is attached before any
185-
// userland ones. NEVER DO THIS. This is here only because this code needs
186-
// to continue to work with older versions of Node.js that do not include
187-
// the prependListener() method. The goal is to eventually remove this hack.
188-
if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
189-
}
190-
}`
191-
]
178+
192179

193180
module.exports['_stream_duplex.js'] = [
194181
requireReplacement
@@ -234,7 +221,6 @@ module.exports['_stream_readable.js'] = [
234221
, bufferShimFix
235222
, bufferStaticMethods
236223
, internalDirectory
237-
, prependFix
238224
]
239225

240226
module.exports['_stream_transform.js'] = [

0 commit comments

Comments
 (0)