New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-console-clean

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-console-clean - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

test/test4/dist/replace.js

14

Gruntfile.js

@@ -37,2 +37,12 @@ /*

},
test4: {
options: {
strategy: function (content) {
return '//' + content;
}
},
files : [
{ src: ['test/test4/replace.js'], dest: 'test/test4/dist/replace.js' }
]
}
},

@@ -55,2 +65,3 @@

test3: ['test/test3/test.js'],
test4: ['test/test4/test.js']
},

@@ -74,5 +85,6 @@

grunt.registerTask('test-3', ['clean', 'console-clean:test3', 'nodeunit:test3']);
grunt.registerTask('test-4', ['clean', 'console-clean:test4', 'nodeunit:test4']);
// By default, lint and run all tests.
grunt.registerTask('default', ['jshint', 'test-1', 'test-2', 'test-3']);
grunt.registerTask('default', ['jshint', 'test-1', 'test-2', 'test-3', 'test-4']);
};

4

package.json
{
"name": "grunt-console-clean",
"version": "0.1.1",
"version": "0.2.0",
"description": "Plugin for grunt to clean up code from console object",

@@ -47,2 +47,2 @@ "author": "Tomasz Czechowski",

"homepage": "https://github.com/tomaszczechowski/grunt-console-clean"
}
}

@@ -27,3 +27,3 @@ # grunt-console-clean

*This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that [you upgrade](http://gruntjs.com/upgrading-from-0.3-to-0.4), but in case you can't please use [v0.3.2](https://github.com/outaTiME/grunt-replace/tree/grunt-0.3-stable).*
*This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that [you upgrade](http://gruntjs.com/upgrading-from-0.3-to-0.4)*

@@ -36,6 +36,7 @@ ## Console clean

##### variables
Name: allows
Type: `array`
#### variables
Name: **allows**
Type: **`array`**
This option is used to determine "console" object to be unchanged.

@@ -45,6 +46,19 @@

options : {
allows: ["log", "warn"]
allows: ["log", "warn"]
}
```
Name: **strategy**
Type: **`function`**
This option is used to modify/comment-out found console object. It allows to change strategy of commeting from "/**/" to e.g. "//".
```javascript
options : {
strategy: function (content) {
return '//' + content;
}
}
```
### Usage Examples

@@ -51,0 +65,0 @@

@@ -35,5 +35,10 @@ /*

){
var to = options.hasOwnProperty('strategy')
? options.strategy(m[0])
: '/*' + m[0] + '*/';
replace.push({
from: m[0],
to: '/*' + m[0] + '*/'
to: to
});

@@ -40,0 +45,0 @@ }

Sorry, the diff of this file is not supported yet

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