Comparing version 1.2.6 to 1.2.7
@@ -564,21 +564,33 @@ 'use strict'; | ||
/** | ||
* Bitcoin Badge | ||
* @method bitcoin | ||
* Crypto Badge | ||
* @method crypto | ||
* @param {Object} opts | ||
* @param {string} opts.bitcoinURL The url to the bitcoin donation page | ||
* @param {string} opts.cryptoURL The url to the crypto donation page | ||
* @return {string} the result badge | ||
*/ | ||
function bitcoin(_ref22) { | ||
var bitcoinURL = _ref22.bitcoinURL; | ||
function crypto(_ref22) { | ||
var cryptoURL = _ref22.cryptoURL, | ||
bitcoinURL = _ref22.bitcoinURL; | ||
// Check | ||
if (!bitcoinURL) throw new Error('bitcoinURL is missing'); | ||
var url = cryptoURL || bitcoinURL; | ||
if (!url) throw new Error('cryptoURL is missing'); | ||
// Create | ||
var image = 'https://img.shields.io/badge/bitcoin-donate-yellow.svg'; | ||
var url = bitcoinURL; | ||
var alt = 'Bitcoin donate button'; | ||
var title = 'Donate once-off to this project using Bitcoin'; | ||
var image = 'https://img.shields.io/badge/crypto-donate-yellow.svg'; | ||
var alt = 'crypto donate button'; | ||
var title = 'Donate to this project using Cryptocurrency'; | ||
return badge({ image: image, alt: alt, url: url, title: title }); | ||
} | ||
crypto.badgeCategory = 'funding'; | ||
/** | ||
* Crypto Badge | ||
* @method bitcoin | ||
* @param {Object} opts - forwarded to {@link crypto} | ||
* @return {string} the result badge | ||
*/ | ||
function bitcoin(opts) { | ||
return crypto(opts); | ||
} | ||
bitcoin.badgeCategory = 'funding'; | ||
@@ -1009,2 +1021,3 @@ | ||
paypal: paypal, | ||
crypto: crypto, | ||
bitcoin: bitcoin, | ||
@@ -1011,0 +1024,0 @@ wishlist: wishlist, |
@@ -564,21 +564,33 @@ 'use strict'; | ||
/** | ||
* Bitcoin Badge | ||
* @method bitcoin | ||
* Crypto Badge | ||
* @method crypto | ||
* @param {Object} opts | ||
* @param {string} opts.bitcoinURL The url to the bitcoin donation page | ||
* @param {string} opts.cryptoURL The url to the crypto donation page | ||
* @return {string} the result badge | ||
*/ | ||
function bitcoin(_ref22) { | ||
var bitcoinURL = _ref22.bitcoinURL; | ||
function crypto(_ref22) { | ||
var cryptoURL = _ref22.cryptoURL, | ||
bitcoinURL = _ref22.bitcoinURL; | ||
// Check | ||
if (!bitcoinURL) throw new Error('bitcoinURL is missing'); | ||
var url = cryptoURL || bitcoinURL; | ||
if (!url) throw new Error('cryptoURL is missing'); | ||
// Create | ||
var image = 'https://img.shields.io/badge/bitcoin-donate-yellow.svg'; | ||
var url = bitcoinURL; | ||
var alt = 'Bitcoin donate button'; | ||
var title = 'Donate once-off to this project using Bitcoin'; | ||
var image = 'https://img.shields.io/badge/crypto-donate-yellow.svg'; | ||
var alt = 'crypto donate button'; | ||
var title = 'Donate to this project using Cryptocurrency'; | ||
return badge({ image: image, alt: alt, url: url, title: title }); | ||
} | ||
crypto.badgeCategory = 'funding'; | ||
/** | ||
* Crypto Badge | ||
* @method bitcoin | ||
* @param {Object} opts - forwarded to {@link crypto} | ||
* @return {string} the result badge | ||
*/ | ||
function bitcoin(opts) { | ||
return crypto(opts); | ||
} | ||
bitcoin.badgeCategory = 'funding'; | ||
@@ -1009,2 +1021,3 @@ | ||
paypal: paypal, | ||
crypto: crypto, | ||
bitcoin: bitcoin, | ||
@@ -1011,0 +1024,0 @@ wishlist: wishlist, |
@@ -499,19 +499,30 @@ 'use strict'; | ||
/** | ||
* Bitcoin Badge | ||
* @method bitcoin | ||
* Crypto Badge | ||
* @method crypto | ||
* @param {Object} opts | ||
* @param {string} opts.bitcoinURL The url to the bitcoin donation page | ||
* @param {string} opts.cryptoURL The url to the crypto donation page | ||
* @return {string} the result badge | ||
*/ | ||
function bitcoin({ bitcoinURL }) { | ||
function crypto({ cryptoURL, bitcoinURL }) { | ||
// Check | ||
if (!bitcoinURL) throw new Error('bitcoinURL is missing'); | ||
const url = cryptoURL || bitcoinURL; | ||
if (!url) throw new Error('cryptoURL is missing'); | ||
// Create | ||
const image = 'https://img.shields.io/badge/bitcoin-donate-yellow.svg'; | ||
const url = bitcoinURL; | ||
const alt = 'Bitcoin donate button'; | ||
const title = 'Donate once-off to this project using Bitcoin'; | ||
const image = 'https://img.shields.io/badge/crypto-donate-yellow.svg'; | ||
const alt = 'crypto donate button'; | ||
const title = 'Donate to this project using Cryptocurrency'; | ||
return badge({ image, alt, url, title }); | ||
} | ||
crypto.badgeCategory = 'funding'; | ||
/** | ||
* Crypto Badge | ||
* @method bitcoin | ||
* @param {Object} opts - forwarded to {@link crypto} | ||
* @return {string} the result badge | ||
*/ | ||
function bitcoin(opts) { | ||
return crypto(opts); | ||
} | ||
bitcoin.badgeCategory = 'funding'; | ||
@@ -902,2 +913,3 @@ | ||
paypal, | ||
crypto, | ||
bitcoin, | ||
@@ -904,0 +916,0 @@ wishlist, |
# History | ||
## v1.2.7 2018 October 26 | ||
- Added the crypto badge as a replacement for the bitcoin badge | ||
## v1.2.6 2018 October 26 | ||
@@ -4,0 +7,0 @@ - Fixed the documentation params for the badges |
{ | ||
"name": "badges", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"description": "The definitive collection of badges for rendering", | ||
@@ -34,2 +34,11 @@ "homepage": "https://github.com/bevry/badges", | ||
"bitcoin", | ||
"crypto", | ||
"liberapay", | ||
"buymeacoffee", | ||
"buy me a coffee", | ||
"boostlab", | ||
"boost lab", | ||
"thanksapp", | ||
"give thanks", | ||
"thanks app", | ||
"wishlist", | ||
@@ -36,0 +45,0 @@ "slack", |
@@ -48,3 +48,3 @@ <!-- TITLE/ --> | ||
<li>Module: <code>require('badges')</code></li> | ||
<li>CDN URL: <code>//wzrd.in/bundle/badges@1.2.6</code></li></ul> | ||
<li>CDN URL: <code>//wzrd.in/bundle/badges@1.2.7</code></li></ul> | ||
@@ -51,0 +51,0 @@ <a href="http://enderjs.com" title="Ender is a full featured package manager for your browser"><h3>Ender</h3></a><ul> |
@@ -505,19 +505,30 @@ 'use strict' | ||
/** | ||
* Bitcoin Badge | ||
* @method bitcoin | ||
* Crypto Badge | ||
* @method crypto | ||
* @param {Object} opts | ||
* @param {string} opts.bitcoinURL The url to the bitcoin donation page | ||
* @param {string} opts.cryptoURL The url to the crypto donation page | ||
* @return {string} the result badge | ||
*/ | ||
function bitcoin ({ bitcoinURL }) { | ||
function crypto ({ cryptoURL, bitcoinURL }) { | ||
// Check | ||
if (!bitcoinURL) throw new Error('bitcoinURL is missing') | ||
const url = cryptoURL || bitcoinURL | ||
if (!url) throw new Error('cryptoURL is missing') | ||
// Create | ||
const image = 'https://img.shields.io/badge/bitcoin-donate-yellow.svg' | ||
const url = bitcoinURL | ||
const alt = 'Bitcoin donate button' | ||
const title = 'Donate once-off to this project using Bitcoin' | ||
const image = 'https://img.shields.io/badge/crypto-donate-yellow.svg' | ||
const alt = 'crypto donate button' | ||
const title = 'Donate to this project using Cryptocurrency' | ||
return badge({ image, alt, url, title }) | ||
} | ||
crypto.badgeCategory = 'funding' | ||
/** | ||
* Crypto Badge | ||
* @method bitcoin | ||
* @param {Object} opts - forwarded to {@link crypto} | ||
* @return {string} the result badge | ||
*/ | ||
function bitcoin (opts) { | ||
return crypto(opts) | ||
} | ||
bitcoin.badgeCategory = 'funding' | ||
@@ -909,2 +920,3 @@ | ||
paypal, | ||
crypto, | ||
bitcoin, | ||
@@ -911,0 +923,0 @@ wishlist, |
170809
3847