Skip to content

Commit 0946f82

Browse files
doquebcoe
authored andcommitted
fix: strip any duplicate extensions from --extension (#237)
1 parent f775a2e commit 0946f82

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

index.js

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ function NYC (opts) {
5858

5959
this.extensions = arrify(config.extension).concat('.js').map(function (ext) {
6060
return ext.toLowerCase()
61+
}).filter(function (item, pos, arr) {
62+
// avoid duplicate extensions
63+
return arr.indexOf(item) === pos
6164
})
6265

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

0 commit comments

Comments
 (0)