Socket
Socket
Sign inDemoInstall

badgen

Package Overview
Dependencies
0
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

badgen


Version published
Weekly downloads
7.4K
decreased by-22.87%
Maintainers
1
Install size
7.86 kB
Created
Weekly downloads
 

Readme

Source

badgen npm-version install size

Fast, handcraft, pure JavaScript badge generator.

  • ⚡️ Fast (see benchmarks)
  • 🌀 Zero dependency (compare with 11 deps for gh-badges which being used on shields.io)

Usage

npm package

npm install badgen

const badgen = require('badgen')

const svgString = badgen({
  subject: 'npm',   // <Text>
  status: 'v1.2.3', // <Text>
  color: 'blue'     // <Color RGB> or <Color Name>
})

Available color names:

Badge Service

https://badgen.now.sh/

Benchmarks

npm run bench on my iMac5K(Late 2014), 3.5G i5, with Node.js 10.5.0:

generate by short params x 806,080 ops/sec ±0.98% (88 runs sampled)
generate by long params  x 735,925 ops/sec ±0.85% (90 runs sampled)
generate by full params  x 770,180 ops/sec ±0.75% (90 runs sampled)

License

ISC

FAQs

Last updated on 03 Jul 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc