diff --git a/build/files.js b/build/files.js
index c97395b2d4..47c21345d6 100644
--- a/build/files.js
+++ b/build/files.js
@@ -72,20 +72,7 @@ const headRegexp = /(^module.exports = \w+;?)/m
, isArrayDefine = [
headRegexp
- , `$1
-
-/**/
-// from https://github.com/juliangruber/isarray/blob/aa39e3199004330bd72daa46207bf22f7ea5be17/index.js
-// MIT Licenced
-// Copyright (c) 2013 Julian Gruber
-
-var toString = {}.toString;
-
-var isArray = Array.isArray || function (arr) {
- return toString.call(arr) == '[object Array]';
-};
-/**/
-`
+ , '$1\n\n/**/\nvar isArray = require(\'isarray\');\n/**/\n'
]
, isArrayReplacement = [
diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js
index 91578d227b..75a73797ec 100644
--- a/lib/_stream_readable.js
+++ b/lib/_stream_readable.js
@@ -7,15 +7,7 @@ var processNextTick = require('process-nextick-args');
/**/
/**/
-// from https://github.com/juliangruber/isarray/blob/aa39e3199004330bd72daa46207bf22f7ea5be17/index.js
-// MIT Licenced
-// Copyright (c) 2013 Julian Gruber
-
-var toString = {}.toString;
-
-var isArray = Array.isArray || function (arr) {
- return toString.call(arr) == '[object Array]';
-};
+var isArray = require('isarray');
/**/
Readable.ReadableState = ReadableState;
diff --git a/package.json b/package.json
index aca4d8279c..60e4c88c90 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,7 @@
"dependencies": {
"buffer-shims": "^1.0.0",
"core-util-is": "~1.0.0",
+ "isarray": "~1.0.0",
"inherits": "~2.0.1",
"process-nextick-args": "~1.0.6",
"string_decoder": "~0.10.x",
@@ -20,6 +21,13 @@
"tape": "~4.5.1",
"zuul": "~3.10.0"
},
+ "bundledDependencies": [
+ "buffer-shims",
+ "core-util-is",
+ "isarray",
+ "process-nextick-args",
+ "util-deprecate"
+ ],
"scripts": {
"test": "tap test/parallel/*.js test/ours/*.js",
"browser": "npm run write-zuul && zuul --browser-retries 2 -- test/browser.js",