
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
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 0 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.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.