badgen
Fast handcraft svg badge generator. Used on badgen.net.
- 🌀 Zero dependency
- ⚡️ Fast by design (see benchmarks)
- 👯 Running in node & browser
Usage
npm install badgen
const badgen = // only `status` is required.const svgString =
Available color names:
In browser
Benchmarks
npm run bench
on iMac 5K (Late 2014), 3.5G i5, with Node.js 12.11.0:
[classic] style, long params x 985,898 ops/sec ±0.37% [classic] style, full params x 1,284,886 ops/sec ±0.42% [classic] style, with emoji x 1,291,768 ops/sec ±0.28% [classic] style, with icon x 1,177,120 ops/sec ±0.94% [flat] style, long params x 780,504 ops/sec ±0.39% [flat] style, full params x 1,012,111 ops/sec ±0.40% [flat] style, with emoji x 1,013,695 ops/sec ±0.91% [flat] style, with icon x 994,481 ops/sec ±0.30%
See Also
- gradient-badge - Badge generator with color gradient support