@@ -48,7 +48,7 @@ module.exports.missing = function (pkg, deps, options) {
48
48
var missing = [ ]
49
49
var config = configure ( pkg , options )
50
50
51
- deps . map ( function ( used ) {
51
+ deps . map ( used => {
52
52
if ( config . allDeps . indexOf ( used ) === - 1 && config . ignore . indexOf ( used ) === - 1 ) {
53
53
missing . push ( used )
54
54
}
@@ -61,7 +61,7 @@ module.exports.extra = function (pkg, deps, options) {
61
61
var missing = [ ]
62
62
var config = configure ( pkg , options )
63
63
64
- config . allDeps . map ( function ( dep ) {
64
+ config . allDeps . map ( dep => {
65
65
if ( deps . indexOf ( dep ) === - 1 && config . ignore . indexOf ( dep ) === - 1 ) {
66
66
missing . push ( dep )
67
67
}
@@ -91,11 +91,11 @@ function getExtensions (extensions, detective) {
91
91
}
92
92
93
93
if ( Array . isArray ( extensions ) ) {
94
- extensions . forEach ( function ( extension ) {
94
+ extensions . forEach ( extension => {
95
95
result [ extension ] = getDetective ( detective )
96
96
} )
97
97
} else if ( typeof extensions === 'object' ) {
98
- Object . keys ( extensions ) . forEach ( function ( extension ) {
98
+ Object . keys ( extensions ) . forEach ( extension => {
99
99
result [ extension ] = getDetective ( extensions [ extension ] || detective )
100
100
} )
101
101
}
@@ -152,7 +152,7 @@ function parse (opts) {
152
152
if ( typeof pkg . bin === 'string' ) {
153
153
paths . push ( path . resolve ( path . join ( path . dirname ( pkgPath ) , pkg . bin ) ) )
154
154
} else {
155
- Object . keys ( pkg . bin ) . forEach ( function ( cmdName ) {
155
+ Object . keys ( pkg . bin ) . forEach ( cmdName => {
156
156
var cmd = pkg . bin [ cmdName ]
157
157
paths . push ( path . resolve ( path . join ( path . dirname ( pkgPath ) , cmd ) ) )
158
158
} )
@@ -162,7 +162,7 @@ function parse (opts) {
162
162
// pass in custom additional entries e.g. ['./test.js']
163
163
if ( opts . entries ) {
164
164
if ( typeof opts . entries === 'string' ) opts . entries = [ opts . entries ]
165
- opts . entries . forEach ( function ( entry ) {
165
+ opts . entries . forEach ( entry => {
166
166
entry = path . resolve ( path . join ( path . dirname ( pkgPath ) , entry ) )
167
167
if ( paths . indexOf ( entry ) === - 1 ) {
168
168
paths . push ( entry )
@@ -178,8 +178,8 @@ function parse (opts) {
178
178
. then ( allDeps => {
179
179
var used = { }
180
180
// merge all deps into one unique list
181
- allDeps . forEach ( function ( deps ) {
182
- Object . keys ( deps ) . forEach ( function ( dep ) {
181
+ allDeps . forEach ( deps => {
182
+ Object . keys ( deps ) . forEach ( dep => {
183
183
used [ dep ] = true
184
184
} )
185
185
} )
@@ -223,7 +223,7 @@ function parse (opts) {
223
223
. then ( contents => {
224
224
var requires = detective ( contents )
225
225
var relatives = [ ]
226
- requires . map ( function ( req ) {
226
+ requires . map ( req => {
227
227
var isCore = builtins . indexOf ( req ) > - 1
228
228
if ( isNotRelative ( req ) && ! isCore ) {
229
229
// require('foo/bar') -> require('foo')
0 commit comments