Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-import-clean

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-import-clean - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc