kopia lustrzana https://github.com/badgen/badgen
b7c0ad38c0 | ||
---|---|---|
bench | ||
lib | ||
test | ||
.gitignore | ||
.npmignore | ||
.travis.yml | ||
README.md | ||
package-lock.json | ||
package.json |
README.md
badgen
Fast, handcraft, pure JavaScript badge generator.
- 🌀 Zero dependeny
- ⚡️ Fast (see benchamrks)
Usage
npm package
npm install badgen
const badgen = require('badgen')
const svgString = badgen({
subject: 'npm',
status: 'v1.2.3',
color: 'blue'
})
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 420,831 ops/sec ±1.03% (87 runs sampled)
generate by long params x 167,862 ops/sec ±1.21% (90 runs sampled)
generate by full params x 245,303 ops/sec ±1.48% (92 runs sampled)