@@ -224,7 +224,7 @@ Base.prototype.resolve = function (logicalPath, options, fn) {
224
224
while ( bower . main . length ) {
225
225
mainfile = bower . main [ 0 ] ;
226
226
227
- if ( '' === extname || extname === path . extname ( mainfile ) ) {
227
+ if ( extname === '' || extname === path . extname ( mainfile ) ) {
228
228
return fn ( path . join ( path . dirname ( pathname ) , mainfile ) ) ;
229
229
}
230
230
}
@@ -334,12 +334,12 @@ Base.prototype.findAsset = function (pathname, options) {
334
334
try {
335
335
pathname = this . resolve ( logical_path ) ;
336
336
337
- if ( '' === path . extname ( logical_path ) ) {
337
+ if ( path . extname ( logical_path ) === '' ) {
338
338
expanded_path = this . attributesFor ( pathname ) . logicalPath ;
339
339
logical_path += path . extname ( expanded_path ) ;
340
340
}
341
341
} catch ( err ) {
342
- if ( 'FileNotFound' === err . code ) {
342
+ if ( err . code === 'FileNotFound' ) {
343
343
return null ;
344
344
}
345
345
@@ -414,7 +414,7 @@ Base.prototype.eachFile = function (iterator) {
414
414
415
415
// Returns true if there were no filters, or `filename` matches at least one
416
416
function matches_filter ( filters , logicalPath , filename ) {
417
- if ( 0 === filters . length ) {
417
+ if ( filters . length === 0 ) {
418
418
return true ;
419
419
}
420
420
@@ -430,15 +430,15 @@ function matches_filter(filters, logicalPath, filename) {
430
430
// prepare string to become RegExp.
431
431
// mimics shell's globbing
432
432
filter = filter . toString ( ) . replace ( / \* \* | \* | \? | \\ .| \. / g, function ( m ) {
433
- if ( '*' === m [ 0 ] ) {
434
- return '**' === m ? '.+?' : '[^/]+?' ;
433
+ if ( m [ 0 ] === '*' ) {
434
+ return m === '**' ? '.+?' : '[^/]+?' ;
435
435
}
436
436
437
- if ( '?' === m [ 0 ] ) {
437
+ if ( m [ 0 ] === '?' ) {
438
438
return '[^/]?' ;
439
439
}
440
440
441
- if ( '.' === m [ 0 ] ) {
441
+ if ( m [ 0 ] === '.' ) {
442
442
return '\\.' ;
443
443
}
444
444
@@ -462,7 +462,7 @@ function logical_path_for_filename(self, filename, filters) {
462
462
}
463
463
464
464
// If filename is an index file, retest with alias
465
- if ( 'index' === path . basename ( filename ) . split ( '.' ) . shift ( ) ) {
465
+ if ( path . basename ( filename ) . split ( '.' ) . shift ( ) === 'index' ) {
466
466
logical_path = logical_path . replace ( / \/ i n d e x \. / , '.' ) ;
467
467
if ( matches_filter ( filters , logical_path , filename ) ) {
468
468
return logical_path ;
@@ -501,11 +501,11 @@ var circular_calls = null;
501
501
502
502
503
503
function circular_call_protection ( pathname , callback ) {
504
- var reset = ( null === circular_calls ) ,
504
+ var reset = ( circular_calls === null ) ,
505
505
calls = circular_calls || ( circular_calls = [ ] ) ;
506
506
507
507
try {
508
- if ( 0 <= calls . indexOf ( pathname ) ) {
508
+ if ( calls . indexOf ( pathname ) >= 0 ) {
509
509
throw new Error ( 'Circular dependency detected: ' + pathname +
510
510
' has already been required' ) ;
511
511
}
@@ -529,7 +529,7 @@ Base.prototype.buildAsset = function (logicalPath, pathname, options) {
529
529
// If there are any processors to run on the pathname, use
530
530
// `BundledAsset`. Otherwise use `StaticAsset` and treat is as binary.
531
531
532
- if ( 0 === this . attributesFor ( pathname ) . processors . length ) {
532
+ if ( this . attributesFor ( pathname ) . processors . length === 0 ) {
533
533
return new StaticAsset ( this . index , logicalPath , pathname ) ;
534
534
}
535
535
0 commit comments