
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
Nodejs module for stripping single/multiline comments from string/s.
Install:
npm install cleanify
To run tests enter module dir and run:
node test.js
Usage:
var fs = require('fs');
var Cleanify = require('cleanify');
/*
* Choose literal string skip type:
* SINGLE: skip only single quoted strings -> 'b//la'
* DOUBLE: skip only double quoted strings -> "b//a"
* MULTI: skip both string types -> "b//la" 'b//a'
*/
var cleanify = new Cleanify(Cleanify.SINGLE);
var cleanify = new Cleanify(Cleanify.DOUBLE);
var cleanify = new Cleanify(Cleanify.MULTI);
// Multi is default
var cleanify = new Cleanify();
var lol = fs.readFileSync('./test/lol.js', 'utf8');
// One argument -> return stripped string
var string = cleanify.strip(lol);
// require() can load .json but comments are not allowed
var wtf = fs.readFileSync('./test/wtf.json', 'utf8');
var oh = fs.readFileSync('./test/oh.txt', 'utf8');
// More then one arguments -> return array of stripped strings
var array = cleanify.strip(lol, oh, wtf);
console.log('string: ' + string);
console.log('array: ' + JSON.stringify(array));
FAQs
strip single/multiline comments
The npm package cleanify receives a total of 3 weekly downloads. As such, cleanify popularity was classified as not popular.
We found that cleanify 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.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.