Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
strip-whitespace-plugin
Advanced tools
Strip-Whitespace-Plugin is a plugin for webpack that will remove extraneous spaces from strings. It's perfect for working with rendering templates (ex. mustache, handlebars) or es6 javascript templates. It works with anything where you might create very long strings.
This plugin and the Strip-Whitespace-Loader do the same thing. The loader can be applied to specific modules/files/assets. This plugin will strip whitespace on all assets.
function() {
if (condition) {
const longString = ' String with some extra spaces ';
}
}
function() {
if (condition) {
const longString = ' String with some extra spaces ';
}
}
Put this plugin before your minification plugins (ex. uglify-js)
var StripWhitespace = require('strip-whitespace-plugin');
module.exports = {
...
plugins: [
new StripWhitespace(),
...
// put your minification plugins here.
]
...
};
FAQs
Strip whitespace from strings in javascript assets
We found that strip-whitespace-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.