Skip to content

testing to see if Array.isArray really is required #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions build/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,6 @@ const headRegexp = /(^module.exports = \w+;?)/m
+ '}catch(_){}}());\n'
]

, isArrayDefine = [
headRegexp
, '$1\n\n/*<replacement>*/\nvar isArray = require(\'isarray\');\n/*</replacement>*/\n'
]

, isArrayReplacement = [
/Array\.isArray/g
, 'isArray'
]

, objectKeysDefine = require('./common-replacements').objectKeysDefine

, objectKeysReplacement = require('./common-replacements').objectKeysReplacement
Expand Down Expand Up @@ -202,8 +192,6 @@ module.exports['_stream_readable.js'] = [
, altIndexOfUseReplacement
, instanceofReplacement
, stringDecoderReplacement
, isArrayDefine
, isArrayReplacement
, debugLogReplacement
, utilReplacement
, stringDecoderReplacement
Expand Down
6 changes: 1 addition & 5 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ module.exports = Readable;
var processNextTick = require('process-nextick-args');
/*</replacement>*/

/*<replacement>*/
var isArray = require('isarray');
/*</replacement>*/

Readable.ReadableState = ReadableState;

/*<replacement>*/
Expand Down Expand Up @@ -65,7 +61,7 @@ function prependListener(emitter, event, fn) {
// 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]];
if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
}

var Duplex;
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"buffer-shims": "^1.0.0",
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
"isarray": "~1.0.0",
"process-nextick-args": "~1.0.6",
"string_decoder": "~0.10.x",
"util-deprecate": "~1.0.1"
Expand Down