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.
gradient-badge
Advanced tools
Badge generator with gradient support 🍭
$ npm i gradient-badge
gradient-badge works exactly like badgen, with the gradient
parameter in addition.
Node.js
const gradientBadge = require('gradient-badge');
const svgString = gradientBadge({
subject: 'version', // <text>
status: 'v1.2.3', // <text>
style: 'flat', // 'flat' or undefined, optional
// And any other parameter supported by badgen (icon, scale...)
gradient: ['pink', 'F78642'], // array of colors (Hexadecimal or name)
});
Browser
<script src="https://cdn.jsdelivr.net/npm/gradient-badge"></script>
<script>
var svgString = gradientBadge({
/* same as above */
});
</script>
Result:
You can apply a color gradient to any badge already generated with badgen:
const { badgen } = require('badgen');
const { applyGradient } = require('gradient-badge');
const originalBadge = badgen({
/* ... */
});
const svgString = applyGradient(originalBadge, ['B65CFF', 'cyan']);
Here are a few more examples of what you can do.
FAQs
Badge generator with gradient support
The npm package gradient-badge receives a total of 94 weekly downloads. As such, gradient-badge popularity was classified as not popular.
We found that gradient-badge 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.