
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
strip-whitespace
Advanced tools
Strip-Whitespace 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.
function() {
if (condition) {
const longString = ' String with some extra spaces ';
}
}
function() {
if (condition) {
const longString = ' String with some extra spaces ';
}
}
$ strip-whitespace --input <input-file> --output <output-file>
var StripWhitespace = require('strip-whitespace');
// options are optional and can be omitted
var stripWhitespace = new StripWhitespace(options);
var result = stripWhitespace.strip(code);
// do things with the code
code = result.code;
All options are optional
{
shouldStripWhitespace: function(fatString) {
// following code will answer the question: should this string be stripped of whitespace?
if (fatString.startsWith('DO NOT MODIFY THIS STRING')) {
return false;
}
return true;
}
}
FAQs
Strip whitespace in strings from javascript assets
The npm package strip-whitespace receives a total of 908 weekly downloads. As such, strip-whitespace popularity was classified as not popular.
We found that strip-whitespace 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.