Skip to content

Commit

Permalink
rm unneded regex
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinmetcalf committed Oct 10, 2016
1 parent a685b1c commit 463b5d5
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions build/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,20 +175,7 @@ const headRegexp = /(^module.exports = \w+;?)/m
/require\('internal\/streams\/BufferList'\)/,
'require(\'./internal/streams/BufferList\')'
]
, prependFix = [
/var prependListener;\n(?:.|\n)+\[fn, emitter\._events\[event]];\n\s\s};\n}/m,
`function prependListener(emitter, event, fn) {
if (typeof emitter.prependListener === 'function') {
return emitter.prependListener(event, fn);
} else {
// This is a hack to make sure that our error handler is attached before any
// userland ones. NEVER DO THIS. This is here only because this code needs
// to continue to work with older versions of Node.js that do not include
// the prependListener() method. The goal is to eventually remove this hack.
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]];
}
}`
]


module.exports['_stream_duplex.js'] = [
requireReplacement
Expand Down Expand Up @@ -234,7 +221,6 @@ module.exports['_stream_readable.js'] = [
, bufferShimFix
, bufferStaticMethods
, internalDirectory
, prependFix
]

module.exports['_stream_transform.js'] = [
Expand Down

0 comments on commit 463b5d5

Please sign in to comment.