42
GitHub - amio/badgen: Fast, handcraft, pure JavaScript badge generator. Running...
source link: https://github.com/amio/badgen
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
badgen
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
Benchmarks
npm run bench
on my iMac5K(Late 2014), 3.5G i5, with Node.js 10.5.0:
generate by short params x 1,085,052 ops/sec ±1.03% (83 runs sampled) generate by long params x 1,046,942 ops/sec ±0.61% (93 runs sampled) generate by full params x 1,266,881 ops/sec ±0.76% (91 runs sampled)
License
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK