Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Helper functions to generate URLs for all badges / shields from shields.io
This package provides functions to generate URLs for all badges / shields from <shields.io>.
Shields are a great way to display information and stats about e.g. an open-source package. But managing them manually is error-prone and slow, especially if you want to generate a large number of shields.
There are other libraries out there offering similar functionality, but they are limited and incomplete. This one contains all supported shields, obtained via scraping the shields.io website, parsing the shield URLs and generating corresponding source code.
# Using yarn
yarn add badge-data
# Using NPM
npm install --save badge-data
The badge objects are nested according to the categories on <shields.io>. Each shield comes with the label
from the website and a url
function that generates the url. All shields and helpers come with type definitions.
The url
function will accept the parameters of the respective shield URL as function arguments plus an additional options
argument to customise the shield with the options explained on the <shields.io> homepage.
import { shieldsIO } from "badge-urls";
console.log(badges.license.github.label);
// Will print: GitHub
console.log(badges.license.github.url("gfmio", "badge-urls"));
// Will print: https://img.shields.io/github/license/gfmio/badge-urls
Alternatively, you can also import an individual shield module:
import * as github from "badge-urls/lib/shields.io/shields/license/github";
console.log(github.label);
// Will print: GitHub
console.log(github.url("gfmio", "badge-urls"));
// Will print: https://img.shields.io/github/license/gfmio/badge-urls
FAQs
Helper functions to generate URLs for all badges / shields from shields.io
We found that badge-urls 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 malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.