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 1.1.0 to 1.1.1

4

lib/calc-text-width.js
// Generate on https://codesandbox.io/s/lr4ynm652m
/* eslint-disable comma-spacing */
const Arial12Widths = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.33,3.33,4.26,6.67,6.67,10.7,8,2.29,4,4,4.67,7.01,3.33,4,3.33,3.33,6.67,6.67,6.67,6.67,6.67,6.67,6.67,6.67,6.67,6.67,3.33,3.33,7.01,7.01,7.01,6.67,12.2,8,8,8.67,8.67,8,7.33,9.33,8.67,3.33,6,8,6.67,10,8.67,9.33,8,9.33,8.67,8,7.33,8.67,8,11.3,8,8,7.33,3.33,3.33,3.33,5.63,6.67,4,6.67,6.67,6,6.67,6.67,3.33,6.67,6.67,2.67,2.67,6,2.67,10,6.67,6.67,6.67,6.67,4,6,3.33,6.67,6,8.67,6,6,6,4.01,3.12,4.01,7.01]
const Verdana12Widths = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4.22,4.72,5.51,9.82,7.63,12.9,8.72,3.22,5.45,5.45,7.63,9.82,4.37,5.45,4.37,5.45,7.63,7.63,7.63,7.63,7.63,7.63,7.63,7.63,7.63,7.63,5.45,5.45,9.82,9.82,9.82,6.54,12,8.2,8.23,8.38,9.25,7.59,6.9,9.3,9.02,5.05,5.46,8.31,6.68,10.1,8.98,9.45,7.24,9.45,8.34,8.2,7.39,8.78,8.2,11.9,8.22,7.38,8.22,5.45,5.45,5.45,9.82,7.63,7.63,7.21,7.48,6.25,7.48,7.15,4.22,7.48,7.59,3.29,4.13,7.1,3.29,11.7,7.59,7.28,7.48,7.48,5.12,6.25,4.73,7.59,7.1,9.82,7.1,7.1,6.3,7.62,5.45,7.62,9.82]
const Verdana11Widths = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.87,4.33,5.05,9,6.99,11.8,7.99,2.95,5,5,6.99,9,4,5,4,5,6.99,6.99,6.99,6.99,6.99,6.99,6.99,6.99,6.99,6.99,5,5,9,9,9,6,11,7.52,7.54,7.68,8.48,6.96,6.32,8.53,8.27,4.63,5,7.62,6.12,9.27,8.23,8.66,6.63,8.66,7.65,7.52,6.78,8.05,7.52,10.9,7.54,6.77,7.54,5,5,5,9,6.99,6.99,6.61,6.85,5.73,6.85,6.55,3.87,6.85,6.96,3.02,3.79,6.51,3.02,10.7,6.96,6.68,6.85,6.85,4.69,5.73,4.33,6.96,6.51,9,6.51,6.51,5.78,6.98,5,6.98,9]

@@ -27,3 +27,3 @@ function calcWidth (charWidthTable) {

Arial12: calcWidth(Arial12Widths),
Verdana12: calcWidth(Verdana12Widths)
Verdana11: calcWidth(Verdana11Widths)
}

@@ -1,2 +0,2 @@

const calcWidth = require('./calc-text-width.js').Verdana12
const calcWidth = require('./calc-text-width.js').Verdana11
const colorPresets = require('./color-presets.js')

@@ -23,7 +23,7 @@

<rect rx="3" width="${width}" height="20" fill="url(#a)"/>
<g fill="#fff" text-anchor="start" font-family="DejaVu Sans,Verdana,sans-serif" font-size="12">
<text x="6" y="15" fill="#000" opacity="0.2">${subject}</text>
<text x="5" y="14">${subject}</text>
<text x="${stTextStart + 1}" y="15" fill="#000" opacity="0.2">${status}</text>
<text x="${stTextStart}" y="14">${status}</text>
<g fill="#fff" text-anchor="start" font-family="DejaVu Sans,Verdana,sans-serif" font-size="11">
<text x="6" y="14" fill="#000" opacity="0.2">${subject}</text>
<text x="5" y="13">${subject}</text>
<text x="${stTextStart + 1}" y="14" fill="#000" opacity="0.2">${status}</text>
<text x="${stTextStart}" y="13">${status}</text>
</g><script/>

@@ -30,0 +30,0 @@ </svg>

{
"name": "badgen",
"version": "1.1.0",
"version": "1.1.1",
"description": "Hand-crafted badge generator.",

@@ -5,0 +5,0 @@ "author": "Amio <amio.cn@gmail.com>",

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