Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.4.0 to 2.4.1

3

lib/index.js
const calcWidth = require('./calc-text-width.js').Verdana110
const colorPresets = require('./color-presets.js')
module.exports = ({ subject, status, color, style, icon, iconWidth = 130 }) => {
module.exports = ({ subject, status, color, style, icon, iconWidth = 13 }) => {
typeAssert(typeof subject === 'string', '<subject> must be string')
typeAssert(typeof status === 'string', '<status> must be string')
color = colorPresets[color] || color || colorPresets['blue']
iconWidth = iconWidth * 10

@@ -9,0 +10,0 @@ const iconSpanWidth = icon ? (subject.length ? iconWidth + 40 : iconWidth - 20) : 0

{
"name": "badgen",
"version": "2.4.0",
"version": "2.4.1",
"description": "Fast svg badge generator.",

@@ -5,0 +5,0 @@ "repository": "amio/badgen",

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