grunt-import-clean
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "grunt-import-clean", | ||
"description": "identify unused imports in es6 modules", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"homepage": "https://github.com/elnarddogg/grunt-import-clean", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -45,17 +45,16 @@ module.exports = (function() { | ||
imports = imports.reduce(function( prev , current ) { | ||
var str = current.join( '' ).replace( RE_CLEAN , '' ); | ||
var match = RE_PARSE1.exec( str ); | ||
match = match ? match[1] : null; | ||
if (RE_PARSE2.test( match )) { | ||
match = RE_PARSE2.exec( match ); | ||
match = match ? match[1].split( ',' ) : null; | ||
} | ||
return prev.concat( match ); | ||
}, []); | ||
imports = imports | ||
.filter(function( $import ) { | ||
return !!$import; | ||
}) | ||
.reduce(function( prev , current ) { | ||
var str = current.join( '' ).replace( RE_CLEAN , '' ); | ||
var match = RE_PARSE1.exec( str ); | ||
match = match ? match[1] : null; | ||
if (RE_PARSE2.test( match )) { | ||
match = RE_PARSE2.exec( match ); | ||
match = match ? match[1].split( ',' ) : null; | ||
} | ||
return prev.concat( match ); | ||
},[]); | ||
} | ||
@@ -62,0 +61,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26264
860