Skip to content

Commit

Permalink
add a DocBlock for BadgeFactory.create()
Browse files Browse the repository at this point in the history
  • Loading branch information
chris48s committed Oct 25, 2018
1 parent 38fa253 commit cb94899
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/gh-badges.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ class BadgeFactory {
: new PDFKitTextMeasurer(fontPath, fallbackFontPath)
}

/**
* Create a badge
*
* @param {object} format - Object specifying badge data
* @param {string[]} format.text
* @param {string} format.colorscheme
* @param {string} format.colorA
* @param {string} format.colorB
* @param {string} format.format
* @param {string} format.template
* @return {string} Badge in SVG or JSON format
* @see https://github.com/badges/shields/blob/master/doc/gh-badges.md
*/
create(format) {
return makeBadge(this.measurer, format)
}
Expand Down

0 comments on commit cb94899

Please sign in to comment.