Skip to content

Commit

Permalink
fix: strip any duplicate extensions from --extension (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
doque authored and bcoe committed Apr 27, 2016
1 parent f775a2e commit 0946f82
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ function NYC (opts) {

this.extensions = arrify(config.extension).concat('.js').map(function (ext) {
return ext.toLowerCase()
}).filter(function (item, pos, arr) {
// avoid duplicate extensions
return arr.indexOf(item) === pos
})

this.transforms = this.extensions.reduce(function (transforms, ext) {
Expand Down

0 comments on commit 0946f82

Please sign in to comment.