Socket
Socket
Sign inDemoInstall

badgen

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

badgen - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

11

lib/index.js

@@ -10,4 +10,5 @@ const calcWidth = require('./calc-text-width.js').Verdana11

const iconSpanWidth = icon ? (subject.length ? iconWidth + 4 : iconWidth - 2) : 0
const sbTextWidth = calcWidth(subject, emoji)
const stTextWidth = calcWidth(status, emoji)
const sbRectWidth = calcWidth(subject, emoji) + 10 + iconSpanWidth
const sbRectWidth = sbTextWidth + 10.2 + iconSpanWidth
const stRectWidth = stTextWidth + 10

@@ -24,4 +25,4 @@ const width = sbRectWidth + stRectWidth

<g fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="11">
<text x="${icon ? '22.5' : '6'}" y="14.8" fill="#000" opacity="0.1">${subject}</text>
<text x="${icon ? '21.5' : '5'}" y="13.8">${subject}</text>
<text x="${icon ? '22.5' : '6.3'}" y="14.8" textLength="${sbTextWidth}" fill="#000" opacity="0.1">${subject}</text>
<text x="${icon ? '21.5' : '5.3'}" y="13.8" textLength="${sbTextWidth}">${subject}</text>
<text x="${sbRectWidth + 5.5}" y="14.8" fill="#000" opacity="0.1" textLength="${stTextWidth}">${status}</text>

@@ -48,4 +49,4 @@ <text x="${sbRectWidth + 4.5}" y="13.8" textLength="${stTextWidth}">${status}</text>

<g fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="11">
<text x="${icon ? '22.5' : '6'}" y="14.8" fill="#000" opacity="0.25">${subject}</text>
<text x="${icon ? '21.5' : '5'}" y="13.8">${subject}</text>
<text x="${icon ? '22.5' : '6.5'}" y="14.8" textLength="${sbTextWidth}" fill="#000" opacity="0.25">${subject}</text>
<text x="${icon ? '21.5' : '5.5'}" y="13.8" textLength="${sbTextWidth}">${subject}</text>
<text x="${sbRectWidth + 5.5}" y="14.8" fill="#000" opacity="0.25" textLength="${stTextWidth}">${status}</text>

@@ -52,0 +53,0 @@ <text x="${sbRectWidth + 4.5}" y="13.8" textLength="${stTextWidth}">${status}</text>

{
"name": "badgen",
"version": "2.2.1",
"version": "2.2.2",
"description": "Fast svg badge generator.",

@@ -19,3 +19,3 @@ "repository": "amio/badgen",

"benchmark": "^2.1.4",
"serve-marked": "0.2.0",
"serve-marked": "0.3.2",
"standard": "^11.0.1",

@@ -22,0 +22,0 @@ "tap": "^12.0.1"

@@ -7,3 +7,3 @@ # badgen

Fast handcraft svg badge generator.
Fast handcraft svg badge generator. Used on [badgen.net](https://badgen.net).

@@ -16,4 +16,2 @@ - 🌀 1 dependency ([unicode-astral-regex][uar-link])

### npm package
`npm install badgen`

@@ -47,6 +45,2 @@

### Badge As A Service
https://badgen.net
## Benchmarks

@@ -53,0 +47,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc