shields-badge-data
Gets Shields.io badge data.
API
shieldsBadgeData(badgeName, badgeArgs, options?) => BadgeData
badgeName
is one of these. For example,'travisCi'
.badgeArgs
: A set of arguments for the specific badge. See badge specs.options
?BadgeData
:
URLs
URLs are WHATWG URL objects. The package.json
browser
field is used so that:
- In Node.js the they are instances of the Node.js implementation.
- In a browser build they are instances of the browser implementation.
Example
const title image link = title// 'Travis CI build status badge for `foo/bar`'imagehref// 'https://img.shields.io/travis/foo/bar.svg'linkhref// 'https://travis-ci.org/foo/bar'