@@ -13,7 +13,7 @@ var concat = require('concat-stream');
13
13
var inherits = require ( 'inherits' ) ;
14
14
var EventEmitter = require ( 'events' ) . EventEmitter ;
15
15
var xtend = require ( 'xtend' ) ;
16
- var isarray = require ( 'isarray' ) ;
16
+ var isArray = Array . isArray ;
17
17
var defined = require ( 'defined' ) ;
18
18
var has = require ( 'has' ) ;
19
19
var sanitize = require ( 'htmlescape' ) . sanitize ;
@@ -38,7 +38,7 @@ function Browserify (files, opts) {
38
38
if ( ! ( this instanceof Browserify ) ) return new Browserify ( files , opts ) ;
39
39
if ( ! opts ) opts = { } ;
40
40
41
- if ( typeof files === 'string' || isarray ( files ) || isStream ( files ) ) {
41
+ if ( typeof files === 'string' || isArray ( files ) || isStream ( files ) ) {
42
42
opts = xtend ( opts , { entries : [ ] . concat ( opts . entries || [ ] , files ) } ) ;
43
43
}
44
44
else opts = xtend ( files , opts ) ;
@@ -72,7 +72,7 @@ function Browserify (files, opts) {
72
72
73
73
var ignoreTransform = [ ] . concat ( opts . ignoreTransform ) . filter ( Boolean ) ;
74
74
self . _filterTransform = function ( tr ) {
75
- if ( Array . isArray ( tr ) ) {
75
+ if ( isArray ( tr ) ) {
76
76
return ignoreTransform . indexOf ( tr [ 0 ] ) === - 1 ;
77
77
}
78
78
return ignoreTransform . indexOf ( tr ) === - 1 ;
@@ -100,7 +100,7 @@ function Browserify (files, opts) {
100
100
101
101
Browserify . prototype . require = function ( file , opts ) {
102
102
var self = this ;
103
- if ( isarray ( file ) ) {
103
+ if ( isArray ( file ) ) {
104
104
file . forEach ( function ( x ) {
105
105
if ( typeof x === 'object' ) {
106
106
self . require ( x . file , xtend ( opts , x ) ) ;
@@ -193,7 +193,7 @@ Browserify.prototype.require = function (file, opts) {
193
193
Browserify . prototype . add = function ( file , opts ) {
194
194
var self = this ;
195
195
if ( ! opts ) opts = { } ;
196
- if ( isarray ( file ) ) {
196
+ if ( isArray ( file ) ) {
197
197
file . forEach ( function ( x ) { self . add ( x , opts ) } ) ;
198
198
return this ;
199
199
}
@@ -202,7 +202,7 @@ Browserify.prototype.add = function (file, opts) {
202
202
203
203
Browserify . prototype . external = function ( file , opts ) {
204
204
var self = this ;
205
- if ( isarray ( file ) ) {
205
+ if ( isArray ( file ) ) {
206
206
file . forEach ( function ( f ) {
207
207
if ( typeof f === 'object' ) {
208
208
self . external ( f , xtend ( opts , f ) ) ;
@@ -285,7 +285,7 @@ Browserify.prototype.transform = function (tr, opts) {
285
285
if ( typeof opts === 'function' || typeof opts === 'string' ) {
286
286
tr = [ opts , tr ] ;
287
287
}
288
- if ( isarray ( tr ) ) {
288
+ if ( isArray ( tr ) ) {
289
289
opts = tr [ 1 ] ;
290
290
tr = tr [ 0 ] ;
291
291
}
@@ -341,7 +341,7 @@ Browserify.prototype.transform = function (tr, opts) {
341
341
} ;
342
342
343
343
Browserify . prototype . plugin = function ( p , opts ) {
344
- if ( isarray ( p ) ) {
344
+ if ( isArray ( p ) ) {
345
345
opts = p [ 1 ] ;
346
346
p = p [ 0 ] ;
347
347
}
@@ -496,7 +496,7 @@ Browserify.prototype._createDeps = function (opts) {
496
496
mopts . modules = { } ;
497
497
self . _exclude . push . apply ( self . _exclude , Object . keys ( builtins ) ) ;
498
498
}
499
- else if ( opts . builtins && isarray ( opts . builtins ) ) {
499
+ else if ( opts . builtins && isArray ( opts . builtins ) ) {
500
500
mopts . modules = { } ;
501
501
opts . builtins . forEach ( function ( key ) {
502
502
mopts . modules [ key ] = builtins [ key ] ;
0 commit comments