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.
clean-css-promise
Advanced tools
clean-css with the default Promise interface and some improvements
clean-css with the default Promise interface and some improvements
const CleanCssPromise = require('clean-css-promise');
(async () => {
const {styles} = await new CleanCssPromise().minify(`
p {
color: #ff0000;
}
b {
/* nothing */
}
`); //=> 'p{color:red}'
})();
npm install clean-css-promise
const CleanCssPromise = require('clean-css-promise');
options: Object
(clean-css constructor options)
Almost the same the original clean-css
, except for:
returnPromise
option is enabled by default, and cannot be disabled.Error
instead of an Array
.const CleanCssPromise = require('clean-css-promise');
new CleanCssPromise({})
.minify('@import url(/foo);}')
.catch(err => {
err.message;
/*=> `2 errors found while optimizing CSS with clean-css:
1. Ignoring local @import of "/foo" as resource is missing.
2. Invalid character(s) '?' at 1:18. Ignoring.
clean-css dangerously ignores these errors but clean-css-promise doesn't, because it's much more reasonable to update the CSS to fix all problems than to pretend that you didn't see the errors.` */
});
ISC License © 2017 - 2019 Watanabe Shinnosuke
FAQs
clean-css with the default Promise interface and some improvements
We found that clean-css-promise 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.