grunt-import-clean
Advanced tools
Comparing version 0.1.7 to 0.1.8
{ | ||
"name": "grunt-import-clean", | ||
"description": "identify unused imports in es6 modules", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"homepage": "https://github.com/elnarddogg/grunt-import-clean", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -11,3 +11,3 @@ module.exports = (function() { | ||
var RE_EXTRACT = /^(import(.|\n)*from.*('|"|;))$/gmi; | ||
var RE_EXTRACT = /^(import(?:[^;]|\n)*from.*(?:'|"|;))$/gmi; | ||
var RE_START = /^import/i; | ||
@@ -20,3 +20,3 @@ var RE_END = /from.*('|"|;)$/i; | ||
var input = file.input; | ||
var text = RE_EXTRACT.exec( input ); | ||
var text = input.match( RE_EXTRACT ); | ||
var imports = []; | ||
@@ -27,3 +27,2 @@ var block = null; | ||
text = text[0].split( '\n' ); | ||
input = input.replace( RE_EXTRACT , '' ); | ||
@@ -30,0 +29,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
28866
969