Fast handcraft svg badge generator library . Used on badgen.net.
 
 
Go to file
Amio b6014b1d22 Add lru-cache to service 2018-06-23 16:29:48 +08:00
lib CalcTextWidth return 0 for none string input 2018-06-23 16:27:33 +08:00
test
.gitignore
.npmignore Add .npmignore 2018-06-23 00:37:11 +08:00
README.md Adjust md format 2018-06-23 15:49:25 +08:00
now.json Fix deploy errors 2018-06-23 00:57:26 +08:00
package-lock.json Add lru-cache to service 2018-06-23 16:29:48 +08:00
package.json Add lru-cache to service 2018-06-23 16:29:48 +08:00
service.js Add lru-cache to service 2018-06-23 16:29:48 +08:00

README.md

badgen npm-version install size

Fast, handcraft, pure JavaScript badge generator.

Usage

Badge Service

https://badgen.now.sh/badge/:subject/:status/:color

  • subject Text
  • status Text
  • color Color RGB (default '3C1') or Color Preset (green, yellow, ...see below)

Color Presets:

Examples:

Preview URL
https://badgen.now.sh/badge/build/passing
https://badgen.now.sh/badge/style/standard/f2a
https://badgen.now.sh/badge/license/Apache-2.0/blue
https://badgen.now.sh/badge/platform/ios%20%7C%20osx%20%7C%20tvos/grey

Programmatically

npm install badgen

const badgen = require('badgen')

const svgString = badgen({
  subject: 'npm',
  status: 'v1.2.3',
  color: 'blue'
})

License

MIT @ Amio