badging
Index of frequently used badges for NPM
Get Started
Install the package as one of dependencies of your package:
npm install --save badging
Then, require it and get medal info you need. E.g.
const badging = require('badging');
var badge = badging.npm.version('npm-package-name');
var html = badge.toHtml();
var markdown = badge.toMarkdown();
var text = `<a href="${badge.href}"><img src="${badge.src}"/></a>`;
Embodied Badges
npm.downloads
var badge = badging.npm.downloads(packageName, unit);
The unit
may be one of:
npm.license
var badge = badging.npm.license(packageName);
npm.version
var badge = badging.npm.version(packageName);
github.coveralls
var badge = badging.github.coveralls(userName, repoName);
github.star
var badge = badging.github.star(userName, repoName);
github.travis
var badge1 = badging.github.travis(userName, repoName);
var badge2 = badging.github.travis(userName, repoName, branch);