Comparing version 1.2.4 to 1.2.5
# History | ||
## v1.2.5 2018 October 26 | ||
- Added [Buy Me A Coffee](https://buymeacoffee.com) badge | ||
- Added [Liberapay](https://liberapay.com) badge | ||
- Added [Thanks App](https://givethanks.app) badge | ||
- Added [Boost Lab](https://boost-lab.app) badge | ||
- Updated [base files](https://github.com/bevry/base) using [boundation](https://github.com/bevry/boundation) | ||
## v1.2.4 2017 January 27 | ||
@@ -4,0 +11,0 @@ - meta: update docs URL to not use https |
@@ -1,5 +0,4 @@ | ||
// 2016 December 29 | ||
// https://github.com/bevry/editions | ||
'use strict' | ||
/** @type {typeof import("./source/index.js") } */ | ||
module.exports = require('editions').requirePackage(__dirname, require) |
158
package.json
{ | ||
"name": "badges", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"description": "The definitive collection of badges for rendering", | ||
@@ -74,9 +74,6 @@ "homepage": "https://github.com/bevry/badges", | ||
"opencollective", | ||
"gratipay", | ||
"flattr", | ||
"paypal", | ||
"bitcoin", | ||
"wishlist", | ||
"---", | ||
"slackin" | ||
"wishlist" | ||
], | ||
@@ -86,8 +83,6 @@ "config": { | ||
"opencollectiveUsername": "bevry", | ||
"gratipayUsername": "bevry", | ||
"flattrUsername": "balupton", | ||
"paypalURL": "https://bevry.me/paypal", | ||
"bitcoinURL": "https://bevry.me/bitcoin", | ||
"wishlistURL": "https://bevry.me/wishlist", | ||
"slackinURL": "https://slack.bevry.me" | ||
"wishlistURL": "https://bevry.me/wishlist" | ||
} | ||
@@ -101,3 +96,3 @@ }, | ||
"Benjamin Lupton <b@lupton.cc> (http://balupton.com)", | ||
"Richard Walker <digitalsadhu@gmail.com> (http://lovebeer.nz/)" | ||
"Richard Walker <digitalsadhu@gmail.com> (https://github.com/digitalsadhu)" | ||
], | ||
@@ -109,3 +104,3 @@ "bugs": { | ||
"type": "git", | ||
"url": "http://github.com/bevry/badges.git" | ||
"url": "https://github.com/bevry/badges.git" | ||
}, | ||
@@ -117,62 +112,137 @@ "engines": { | ||
{ | ||
"description": "Source + ESNext + Require", | ||
"description": "esnext source code with require for modules", | ||
"directory": "source", | ||
"entry": "index.js", | ||
"directory": "source", | ||
"syntaxes": [ | ||
"javascript", | ||
"esnext", | ||
"require", | ||
"let", | ||
"const", | ||
"destructuring", | ||
"defaults", | ||
"template strings" | ||
] | ||
"require" | ||
], | ||
"engines": { | ||
"node": ">=6", | ||
"browsers": false | ||
} | ||
}, | ||
{ | ||
"description": "Babel Compiled + ES2015 + Require", | ||
"description": "esnext compiled for browsers with require for modules", | ||
"directory": "edition-browsers", | ||
"entry": "index.js", | ||
"directory": "es2015", | ||
"syntaxes": [ | ||
"javascript", | ||
"es2015", | ||
"require" | ||
] | ||
], | ||
"engines": { | ||
"node": false, | ||
"browsers": "defaults" | ||
} | ||
}, | ||
{ | ||
"description": "esnext compiled for node.js >=11 with require for modules", | ||
"directory": "edition-node-11", | ||
"entry": "index.js", | ||
"syntaxes": [ | ||
"javascript", | ||
"require" | ||
], | ||
"engines": { | ||
"node": "6 || 8 || 10 || 11", | ||
"browsers": false | ||
} | ||
}, | ||
{ | ||
"description": "esnext compiled for node.js >=0.8 with require for modules", | ||
"directory": "edition-node-0.8", | ||
"entry": "index.js", | ||
"syntaxes": [ | ||
"javascript", | ||
"require" | ||
], | ||
"engines": { | ||
"node": "0.8 || 0.10 || 0.12 || 4 || 6 || 8 || 10", | ||
"browsers": false | ||
} | ||
} | ||
], | ||
"main": "index.js", | ||
"browser": "es2015/index.js", | ||
"browser": "edition-browsers/index.js", | ||
"dependencies": { | ||
"editions": "^1.3.3" | ||
"editions": "^2.0.2" | ||
}, | ||
"devDependencies": { | ||
"assert-helpers": "^4.4.0", | ||
"babel-cli": "^6.22.2", | ||
"babel-preset-es2015": "^6.22.0", | ||
"documentation": "^4.0.0-beta.18", | ||
"eslint": "^3.14.1", | ||
"assert-helpers": "^4.5.1", | ||
"babel-cli": "^6.26.0", | ||
"babel-preset-env": "^1.7.0", | ||
"documentation": "^8.1.2", | ||
"eslint": "^5.7.0", | ||
"joe": "^2.0.2", | ||
"joe-reporter-console": "^2.0.1", | ||
"projectz": "^1.3.2" | ||
"joe-reporter-console": "^2.0.2", | ||
"projectz": "^1.4.0", | ||
"surge": "^0.20.1", | ||
"valid-directory": "^1.0.0" | ||
}, | ||
"optionalDependencies": {}, | ||
"scripts": { | ||
"our:setup": "npm install", | ||
"our:clean": "rm -Rf ./docs ./es2015", | ||
"our:compile": "npm run our:compile:es2015", | ||
"our:compile:es2015": "babel ./source --out-dir ./es2015 --presets es2015", | ||
"our:clean": "rm -Rf ./docs ./edition* ./es2015 ./es5 ./out", | ||
"our:compile": "npm run our:compile:edition-browsers && npm run our:compile:edition-node-0.8 && npm run our:compile:edition-node-11", | ||
"our:compile:edition-browsers": "env BABEL_ENV=edition-browsers babel --out-dir ./edition-browsers ./source", | ||
"our:compile:edition-node-0.8": "env BABEL_ENV=edition-node-0.8 babel --out-dir ./edition-node-0.8 ./source", | ||
"our:compile:edition-node-11": "env BABEL_ENV=edition-node-11 babel --out-dir ./edition-node-11 ./source", | ||
"our:deploy": "echo no need for this project", | ||
"our:meta": "npm run our:meta:docs && npm run our:meta:projectz", | ||
"our:meta:docs": "documentation build -f html -o ./docs -g --shallow ./source/**.js", | ||
"our:meta:projectz": "projectz compile", | ||
"our:verify": "npm run our:verify:eslint", | ||
"our:verify:eslint": "eslint --fix ./source", | ||
"our:test": "npm run our:verify && npm test", | ||
"our:release": "npm run our:release:prepare && npm run our:release:check && npm run our:release:tag && npm run our:release:push", | ||
"our:release": "npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push", | ||
"our:release:check-changelog": "cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)", | ||
"our:release:check-dirty": "git diff --exit-code", | ||
"our:release:prepare": "npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta", | ||
"our:release:check": "npm run our:release:check:changelog && npm run our:release:check:dirty", | ||
"our:release:check:changelog": "cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)", | ||
"our:release:check:dirty": "git diff --exit-code", | ||
"our:release:tag": "git tag v$npm_package_version -a", | ||
"our:release:push": "git push origin master && git push origin --tags", | ||
"our:release:tag": "export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"", | ||
"our:setup": "npm run our:setup:npm", | ||
"our:setup:npm": "npm install", | ||
"our:test": "npm run our:verify && npm test", | ||
"our:verify": "npm run our:verify:directory && npm run our:verify:eslint", | ||
"our:verify:directory": "npx valid-directory", | ||
"our:verify:eslint": "eslint --fix ./source", | ||
"test": "node --harmony ./test.js --joe-reporter=console" | ||
}, | ||
"babel": { | ||
"env": { | ||
"edition-browsers": { | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": { | ||
"browsers": "defaults" | ||
} | ||
} | ||
] | ||
] | ||
}, | ||
"edition-node-11": { | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": { | ||
"node": "11" | ||
} | ||
} | ||
] | ||
] | ||
}, | ||
"edition-node-0.8": { | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": { | ||
"node": "0.8" | ||
} | ||
} | ||
] | ||
] | ||
} | ||
} | ||
} | ||
} |
@@ -18,3 +18,2 @@ <!-- TITLE/ --> | ||
<span class="badge-opencollective"><a href="https://opencollective.com/bevry" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-yellow.svg" alt="Open Collective donate button" /></a></span> | ||
<span class="badge-gratipay"><a href="https://www.gratipay.com/bevry" title="Donate weekly to this project using Gratipay"><img src="https://img.shields.io/badge/gratipay-donate-yellow.svg" alt="Gratipay donate button" /></a></span> | ||
<span class="badge-flattr"><a href="https://flattr.com/profile/balupton" title="Donate to this project using Flattr"><img src="https://img.shields.io/badge/flattr-donate-yellow.svg" alt="Flattr donate button" /></a></span> | ||
@@ -24,4 +23,2 @@ <span class="badge-paypal"><a href="https://bevry.me/paypal" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a></span> | ||
<span class="badge-wishlist"><a href="https://bevry.me/wishlist" title="Buy an item on our wishlist for us"><img src="https://img.shields.io/badge/wishlist-donate-yellow.svg" alt="Wishlist browse button" /></a></span> | ||
<br class="badge-separator" /> | ||
<span class="badge-slackin"><a href="https://slack.bevry.me" title="Join this project's slack community"><img src="https://slack.bevry.me/badge.svg" alt="Slack community badge" /></a></span> | ||
@@ -49,3 +46,3 @@ <!-- /BADGES --> | ||
<li>Module: <code>require('badges')</code></li> | ||
<li>CDN URL: <code>//wzrd.in/bundle/badges@1.2.4</code></li></ul> | ||
<li>CDN URL: <code>//wzrd.in/bundle/badges@1.2.5</code></li></ul> | ||
@@ -61,7 +58,7 @@ <a href="http://enderjs.com" title="Ender is a full featured package manager for your browser"><h3>Ender</h3></a><ul> | ||
<ul><li><code>badges</code> aliases <code>badges/index.js</code> which uses <a href="https://github.com/bevry/editions" title="Editions are the best way to produce and consume packages you care about.">Editions</a> to automatically select the correct edition for the consumers environment</li> | ||
<li><code>badges/source/index.js</code> is Source + <a href="https://babeljs.io/docs/learn-es2015/" title="ECMAScript Next">ESNext</a> + <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a></li> | ||
<li><code>badges/es2015/index.js</code> is <a href="https://babeljs.io" title="The compiler for writing next generation JavaScript">Babel</a> Compiled + <a href="http://babeljs.io/docs/plugins/preset-es2015/" title="ECMAScript 2015">ES2015</a> + <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a></li></ul> | ||
<li><code>badges/source/index.js</code> is esnext source code with require for modules</li> | ||
<li><code>badges/edition-browsers/index.js</code> is esnext compiled for browsers with require for modules</li> | ||
<li><code>badges/edition-node-11/index.js</code> is esnext compiled for node.js >=11 with require for modules</li> | ||
<li><code>badges/edition-node-0.8/index.js</code> is esnext compiled for node.js >=0.8 with require for modules</li></ul> | ||
<p>Older environments may need <a href="https://babeljs.io/docs/usage/polyfill/" title="A polyfill that emulates missing ECMAScript environment features">Babel's Polyfill</a> or something similar.</p> | ||
<!-- /INSTALL --> | ||
@@ -230,3 +227,2 @@ | ||
<span class="badge-opencollective"><a href="https://opencollective.com/bevry" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-yellow.svg" alt="Open Collective donate button" /></a></span> | ||
<span class="badge-gratipay"><a href="https://www.gratipay.com/bevry" title="Donate weekly to this project using Gratipay"><img src="https://img.shields.io/badge/gratipay-donate-yellow.svg" alt="Gratipay donate button" /></a></span> | ||
<span class="badge-flattr"><a href="https://flattr.com/profile/balupton" title="Donate to this project using Flattr"><img src="https://img.shields.io/badge/flattr-donate-yellow.svg" alt="Flattr donate button" /></a></span> | ||
@@ -242,3 +238,3 @@ <span class="badge-paypal"><a href="https://bevry.me/paypal" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a></span> | ||
<ul><li><a href="http://balupton.com">Benjamin Lupton</a> — <a href="https://github.com/bevry/badges/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository bevry/badges">view contributions</a></li> | ||
<li><a href="http://lovebeer.nz/">Richard Walker</a> — <a href="https://github.com/bevry/badges/commits?author=digitalsadhu" title="View the GitHub contributions of Richard Walker on repository bevry/badges">view contributions</a></li></ul> | ||
<li><a href="https://github.com/digitalsadhu">Richard Walker</a> — <a href="https://github.com/bevry/badges/commits?author=digitalsadhu" title="View the GitHub contributions of Richard Walker on repository bevry/badges">view contributions</a></li></ul> | ||
@@ -245,0 +241,0 @@ <a href="https://github.com/bevry/badges/blob/master/CONTRIBUTING.md#files">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a> |
@@ -19,9 +19,9 @@ 'use strict' | ||
*/ | ||
function badge ({image, alt, url, title}) { | ||
function badge ({ image, alt, url, title }) { | ||
// Check | ||
if ( !image ) throw new Error('image is missing') | ||
if (!image) throw new Error('image is missing') | ||
// Create | ||
let result = alt ? `<img src="${image}" alt="${alt}" />` : `<img src="${image}" />` | ||
if ( url ) { | ||
if (url) { | ||
result = (title ? `<a href="${url}" title="${title}">` : `<a href="${url}">`) + result + '</a>' | ||
@@ -38,3 +38,3 @@ } | ||
@param {String} config.right The text for the right side of the badge | ||
@param {String} [config.color='yellow] The color for the badge | ||
@param {String} [config.color='yellow'] The color for the badge | ||
@param {String} [config.alt] The alt attribute for the image | ||
@@ -45,10 +45,10 @@ @param {String} [config.url] The URL for the link | ||
*/ | ||
function shields ({left, right, color = 'yellow', alt, url, title}) { | ||
function shields ({ left, right, color = 'yellow', alt, url, title }) { | ||
// Check | ||
if ( !left ) throw new Error('left is missing') | ||
if ( !right ) throw new Error('right is missing') | ||
if (!left) throw new Error('left is missing') | ||
if (!right) throw new Error('right is missing') | ||
// Create | ||
const image = `https://img.shields.io/badge/${left}-${right}-${color}.svg` | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -67,5 +67,5 @@ shields.badgeCategory = 'custom' | ||
*/ | ||
function npmversion ({npmPackageName}) { | ||
function npmversion ({ npmPackageName }) { | ||
// Check | ||
if ( !npmPackageName ) throw new Error('npmPackageName is missing') | ||
if (!npmPackageName) throw new Error('npmPackageName is missing') | ||
@@ -77,3 +77,3 @@ // Create | ||
const title = 'View this project on NPM' | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -88,5 +88,5 @@ npmversion.badgeCategory = 'development' | ||
*/ | ||
function npmdownloads ({npmPackageName}) { | ||
function npmdownloads ({ npmPackageName }) { | ||
// Check | ||
if ( !npmPackageName ) throw new Error('npmPackageName is missing') | ||
if (!npmPackageName) throw new Error('npmPackageName is missing') | ||
@@ -97,3 +97,3 @@ const image = `https://img.shields.io/npm/dm/${npmPackageName}.svg` | ||
const title = 'View this project on NPM' | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -108,5 +108,5 @@ npmdownloads.badgeCategory = 'development' | ||
*/ | ||
function daviddm ({githubSlug}) { | ||
function daviddm ({ githubSlug }) { | ||
// Check | ||
if ( !githubSlug ) throw new Error('githubSlug is missing') | ||
if (!githubSlug) throw new Error('githubSlug is missing') | ||
@@ -118,3 +118,3 @@ // Create | ||
const title = "View the status of this project's dependencies on DavidDM" | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -129,5 +129,5 @@ daviddm.badgeCategory = 'development' | ||
*/ | ||
function daviddmdev ({githubSlug}) { | ||
function daviddmdev ({ githubSlug }) { | ||
// Check | ||
if ( !githubSlug ) throw new Error('githubSlug is missing') | ||
if (!githubSlug) throw new Error('githubSlug is missing') | ||
@@ -139,3 +139,3 @@ // Create | ||
const title = "View the status of this project's development dependencies on DavidDM" | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -153,6 +153,6 @@ daviddmdev.badgeCategory = 'development' | ||
*/ | ||
function nodeico ({npmPackageName, nodeicoQueryString}) { | ||
function nodeico ({ npmPackageName, nodeicoQueryString }) { | ||
// Prepare | ||
if ( !npmPackageName ) throw new Error('npmPackageName is missing') | ||
if ( nodeicoQueryString && typeof nodeicoQueryString !== 'string' && typeof nodeicoQueryString !== 'object' ) { | ||
if (!npmPackageName) throw new Error('npmPackageName is missing') | ||
if (nodeicoQueryString && typeof nodeicoQueryString !== 'string' && typeof nodeicoQueryString !== 'object') { | ||
throw new Error('nodeicoQueryString must be a string or an object') | ||
@@ -168,6 +168,7 @@ } | ||
if (query) image += `?${query}` | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
nodeico.badgeCategory = 'development' | ||
// ==================================== | ||
@@ -182,7 +183,7 @@ // Testing Badges | ||
*/ | ||
function saucelabsbm ({saucelabsUsername, saucelabsAuthToken}) { | ||
function saucelabsbm ({ saucelabsUsername, saucelabsAuthToken }) { | ||
// Check | ||
if ( !saucelabsUsername ) throw new Error('saucelabsUsername is missing') | ||
if (!saucelabsUsername) throw new Error('saucelabsUsername is missing') | ||
saucelabsAuthToken = saucelabsAuthToken || process.env.SAUCELABS_AUTH_TOKEN | ||
if ( !saucelabsAuthToken ) throw new Error('saucelabsAuthToken is missing') | ||
if (!saucelabsAuthToken) throw new Error('saucelabsAuthToken is missing') | ||
@@ -194,3 +195,3 @@ // Create | ||
const title = "Check this project's browser tests on Sauce Labs" | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -207,7 +208,7 @@ saucelabsbm.badgeCategory = 'testing' | ||
*/ | ||
function saucelabs ({saucelabsUsername, saucelabsAuthToken}) { | ||
function saucelabs ({ saucelabsUsername, saucelabsAuthToken }) { | ||
// Check | ||
if ( !saucelabsUsername ) throw new Error('saucelabsUsername is missing') | ||
if (!saucelabsUsername) throw new Error('saucelabsUsername is missing') | ||
saucelabsAuthToken = saucelabsAuthToken || process.env.SAUCELABS_AUTH_TOKEN | ||
if ( !saucelabsAuthToken ) throw new Error('saucelabsAuthToken is missing') | ||
if (!saucelabsAuthToken) throw new Error('saucelabsAuthToken is missing') | ||
@@ -219,3 +220,3 @@ // Create | ||
const title = "Check this project's browser tests on Sauce Labs" | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -230,5 +231,5 @@ saucelabs.badgeCategory = 'testing' | ||
*/ | ||
function travisci ({githubSlug}) { | ||
function travisci ({ githubSlug }) { | ||
// Check | ||
if ( !githubSlug ) throw new Error('githubSlug is missing') | ||
if (!githubSlug) throw new Error('githubSlug is missing') | ||
@@ -240,3 +241,3 @@ // Create | ||
const title = "Check this project's build status on TravisCI" | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -252,6 +253,6 @@ travisci.badgeCategory = 'testing' | ||
*/ | ||
function codeship ({codeshipProjectUUID, codeshipProjectID}) { | ||
function codeship ({ codeshipProjectUUID, codeshipProjectID }) { | ||
// Check | ||
if ( !codeshipProjectUUID ) throw new Error('codeshipProjectUUID is missing') | ||
if ( !codeshipProjectID ) throw new Error('codeshipProjectID is missing') | ||
if (!codeshipProjectUUID) throw new Error('codeshipProjectUUID is missing') | ||
if (!codeshipProjectID) throw new Error('codeshipProjectID is missing') | ||
@@ -263,3 +264,3 @@ // Create | ||
const title = "Check this project's status on Codeship" | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -274,5 +275,5 @@ codeship.badgeCategory = 'testing' | ||
*/ | ||
function coveralls ({githubSlug}) { | ||
function coveralls ({ githubSlug }) { | ||
// Check | ||
if ( !githubSlug ) throw new Error('githubSlug is missing') | ||
if (!githubSlug) throw new Error('githubSlug is missing') | ||
@@ -284,3 +285,3 @@ // Create | ||
const title = "View this project's coverage on Coveralls" | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -295,5 +296,5 @@ coveralls.badgeCategory = 'testing' | ||
*/ | ||
function codeclimate ({githubSlug}) { | ||
function codeclimate ({ githubSlug }) { | ||
// Check | ||
if ( !githubSlug ) throw new Error('githubSlug is missing') | ||
if (!githubSlug) throw new Error('githubSlug is missing') | ||
@@ -305,3 +306,3 @@ // Create | ||
const title = "View this project's rating on Code Climate" | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -316,5 +317,5 @@ codeclimate.badgeCategory = 'testing' | ||
*/ | ||
function bithound ({githubSlug}) { | ||
function bithound ({ githubSlug }) { | ||
// Check | ||
if ( !githubSlug ) throw new Error('githubSlug is missing') | ||
if (!githubSlug) throw new Error('githubSlug is missing') | ||
@@ -326,3 +327,3 @@ // Create | ||
const title = "View this project's score on BitHound" | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -337,5 +338,5 @@ bithound.badgeCategory = 'testing' | ||
*/ | ||
function waffle ({githubSlug}) { | ||
function waffle ({ githubSlug }) { | ||
// Check | ||
if ( !githubSlug ) throw new Error('githubSlug is missing') | ||
if (!githubSlug) throw new Error('githubSlug is missing') | ||
@@ -348,3 +349,3 @@ // Create | ||
const title = "View this project's stories on Waffle.io" | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -364,6 +365,6 @@ waffle.badgeCategory = 'testing' | ||
*/ | ||
function sixtydevstips ({sixtydevstipsID, sixtydevstipsURL}) { | ||
function sixtydevstips ({ sixtydevstipsID, sixtydevstipsURL }) { | ||
// Check | ||
if ( !sixtydevstipsURL ) { | ||
if ( !sixtydevstipsID ) throw new Error('sixtydevstipsID is missing') | ||
if (!sixtydevstipsURL) { | ||
if (!sixtydevstipsID) throw new Error('sixtydevstipsID is missing') | ||
sixtydevstipsURL = `https://tips.60devs.com/tip/${sixtydevstipsID}` | ||
@@ -377,3 +378,3 @@ } | ||
const title = 'Donate to this project using 60devs tips' | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -389,6 +390,6 @@ sixtydevstips.badgeCategory = 'funding' | ||
*/ | ||
function patreon ({patreonUsername, patreonURL}) { | ||
function patreon ({ patreonUsername, patreonURL }) { | ||
// Check | ||
if ( !patreonURL ) { | ||
if ( !patreonUsername ) throw new Error('patreonUsername is missing') | ||
if (!patreonURL) { | ||
if (!patreonUsername) throw new Error('patreonUsername is missing') | ||
patreonURL = `https://patreon.com/${patreonUsername}` | ||
@@ -402,3 +403,3 @@ } | ||
const title = 'Donate to this project using Patreon' | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -414,6 +415,6 @@ patreon.badgeCategory = 'funding' | ||
*/ | ||
function opencollective ({opencollectiveUsername, opencollectiveURL}) { | ||
function opencollective ({ opencollectiveUsername, opencollectiveURL }) { | ||
// Check | ||
if ( !opencollectiveURL ) { | ||
if ( !opencollectiveUsername ) throw new Error('opencollectiveUsername is missing') | ||
if (!opencollectiveURL) { | ||
if (!opencollectiveUsername) throw new Error('opencollectiveUsername is missing') | ||
opencollectiveURL = `https://opencollective.com/${opencollectiveUsername}` | ||
@@ -427,3 +428,3 @@ } | ||
const title = 'Donate to this project using Open Collective' | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -439,7 +440,7 @@ opencollective.badgeCategory = 'funding' | ||
*/ | ||
function gratipay ({gratipayUsername, gratipayURL}) { | ||
function gratipay ({ gratipayUsername, gratipayURL }) { | ||
// Check | ||
if ( !gratipayURL ) { | ||
if ( !gratipayUsername ) throw new Error('gratipayUsername is missing') | ||
gratipayURL = `https://www.gratipay.com/${gratipayUsername}` | ||
if (!gratipayURL) { | ||
if (!gratipayUsername) throw new Error('gratipayUsername is missing') | ||
gratipayURL = `https://gratipay.com/${gratipayUsername}` | ||
} | ||
@@ -452,3 +453,3 @@ | ||
const title = 'Donate weekly to this project using Gratipay' | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -465,9 +466,9 @@ gratipay.badgeCategory = 'funding' | ||
*/ | ||
function flattr ({flattrCode, flattrUsername, flattrURL}) { | ||
function flattr ({ flattrCode, flattrUsername, flattrURL }) { | ||
// Check | ||
if ( !flattrURL ) { | ||
if ( flattrUsername ) { | ||
if (!flattrURL) { | ||
if (flattrUsername) { | ||
flattrURL = `https://flattr.com/profile/${flattrUsername}` | ||
} | ||
else if ( flattrCode ) { | ||
else if (flattrCode) { | ||
flattrURL = `https://flattr.com/thing/${flattrCode}` | ||
@@ -485,3 +486,3 @@ } | ||
const title = 'Donate to this project using Flattr' | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -498,9 +499,9 @@ flattr.badgeCategory = 'funding' | ||
*/ | ||
function paypal ({paypalURL, paypalButtonID, paypalUsername}) { | ||
function paypal ({ paypalURL, paypalButtonID, paypalUsername }) { | ||
// Check | ||
if ( !paypalURL ) { | ||
if ( paypalButtonID ) { | ||
if (!paypalURL) { | ||
if (paypalButtonID) { | ||
paypalURL = `https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=${escape(paypalButtonID)}` | ||
} | ||
else if ( paypalUsername ) { | ||
else if (paypalUsername) { | ||
paypalURL = `https://paypal.me/${paypalUsername}` | ||
@@ -518,3 +519,3 @@ } | ||
const title = 'Donate to this project using Paypal' | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -529,5 +530,5 @@ paypal.badgeCategory = 'funding' | ||
*/ | ||
function bitcoin ({bitcoinURL}) { | ||
function bitcoin ({ bitcoinURL }) { | ||
// Check | ||
if ( !bitcoinURL ) throw new Error('bitcoinURL is missing') | ||
if (!bitcoinURL) throw new Error('bitcoinURL is missing') | ||
@@ -539,3 +540,3 @@ // Create | ||
const title = 'Donate once-off to this project using Bitcoin' | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -550,5 +551,5 @@ bitcoin.badgeCategory = 'funding' | ||
*/ | ||
function wishlist ({wishlistURL}) { | ||
function wishlist ({ wishlistURL }) { | ||
// Check | ||
if ( !wishlistURL ) throw new Error('wishlistURL is missing') | ||
if (!wishlistURL) throw new Error('wishlistURL is missing') | ||
@@ -560,7 +561,93 @@ // Create | ||
const title = 'Buy an item on our wishlist for us' | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
wishlist.badgeCategory = 'funding' | ||
/** | ||
Buy Me A Coffee Badge | ||
@method buymeacoffee | ||
@param {String} config.buymeacoffeeUsername The Buy Me A Coffee username to donate to | ||
@param {String} config.buymeacoffeeURL The url to the Buy Me A Coffee donate page | ||
@return {String} the result badge | ||
*/ | ||
function buymeacoffee ({ buymeacoffeeUsername, buymeacoffeeURL }) { | ||
// Check | ||
if (!buymeacoffeeURL) { | ||
if (!buymeacoffeeUsername) throw new Error('buymeacoffeeUsername is missing') | ||
buymeacoffeeURL = `https://buymeacoffee.com/${buymeacoffeeUsername}` | ||
} | ||
// Create | ||
const image = 'https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg' | ||
const url = buymeacoffeeURL | ||
const alt = 'Buy Me A Coffee donate button' | ||
const title = 'Donate to this project using Buy Me A Coffee' | ||
return badge({ image, alt, url, title }) | ||
} | ||
buymeacoffee.badgeCategory = 'funding' | ||
/** | ||
Liberapay Badge | ||
@method liberapay | ||
@param {String} config.liberapayUsername The Liberapay username to donate to | ||
@param {String} config.liberapayURL The url to the Liberapay donate page | ||
@return {String} the result badge | ||
*/ | ||
function liberapay ({ liberapayUsername, liberapayURL }) { | ||
// Check | ||
if (!liberapayURL) { | ||
if (!liberapayUsername) throw new Error('liberapayUsername is missing') | ||
liberapayURL = `https://liberapay.com/${liberapayUsername}` | ||
} | ||
// Create | ||
const image = 'https://img.shields.io/badge/liberapay-donate-yellow.svg' | ||
const url = liberapayURL | ||
const alt = 'Liberapay donate button' | ||
const title = 'Donate to this project using Liberapay' | ||
return badge({ image, alt, url, title }) | ||
} | ||
liberapay.badgeCategory = 'funding' | ||
/** | ||
Thanks App Badge | ||
@method thanksapp | ||
@param {String} config.githubSlug The github slug that the project lives at (e.g. bevry/badges) | ||
@param {String} config.npmPackageName The repository slug (username/reponame) | ||
@return {String} the result badge | ||
*/ | ||
function thanksapp ({ githubSlug, npmPackageName }) { | ||
// Check | ||
if (!githubSlug && !npmPackageName) throw new Error('githubSlug and npmPackageName are missing, at least one is required') | ||
const slug = npmPackageName ? `npm/${npmPackageName}` : `github/${githubSlug}` | ||
// Create | ||
const image = 'https://img.shields.io/badge/thanksapp-donate-yellow.svg' | ||
const url = `https://givethanks.app/donate/${slug}` | ||
const alt = 'Thanks App donate button' | ||
const title = 'Donate to this project using Thanks App' | ||
return badge({ image, alt, url, title }) | ||
} | ||
thanksapp.badgeCategory = 'funding' | ||
/** | ||
Boost Lab Badge | ||
@method boostlab | ||
@param {String} config.githubSlug The github slug that the project lives at (e.g. bevry/badges) | ||
@return {String} the result badge | ||
*/ | ||
function boostlab ({ githubSlug }) { | ||
// Check | ||
if (!githubSlug) throw new Error('githubSlug is missing') | ||
// Create | ||
const image = 'https://img.shields.io/badge/boostlab-donate-yellow.svg' | ||
const url = `https://boost-lab.app/${githubSlug}` | ||
const alt = 'Boost Lab donate button' | ||
const title = 'Donate to this project using Boost Lab' | ||
return badge({ image, alt, url, title }) | ||
} | ||
boostlab.badgeCategory = 'funding' | ||
// ==================================== | ||
@@ -575,5 +662,5 @@ // Social Badges | ||
*/ | ||
function slackinscript ({slackinURL}) { | ||
function slackinscript ({ slackinURL }) { | ||
// Check | ||
if ( !slackinURL ) throw new Error('slackinURL is missing') | ||
if (!slackinURL) throw new Error('slackinURL is missing') | ||
@@ -592,5 +679,5 @@ // Create | ||
*/ | ||
function slackin ({slackinURL}) { | ||
function slackin ({ slackinURL }) { | ||
// Check | ||
if ( !slackinURL ) throw new Error('slackinURL is missing') | ||
if (!slackinURL) throw new Error('slackinURL is missing') | ||
@@ -602,3 +689,3 @@ // Create | ||
const title = 'Join this project\'s slack community' | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -615,6 +702,6 @@ slackin.badgeCategory = 'social' | ||
*/ | ||
function gabeacon ({gaTrackingID, githubSlug}) { | ||
function gabeacon ({ gaTrackingID, githubSlug }) { | ||
// Check | ||
if ( !gaTrackingID ) throw new Error('gaTrackingID is missing') | ||
if ( !githubSlug ) throw new Error('githubSlug is missing') | ||
if (!gaTrackingID) throw new Error('gaTrackingID is missing') | ||
if (!githubSlug) throw new Error('githubSlug is missing') | ||
@@ -626,3 +713,3 @@ // Create | ||
const title = 'Get Google Analytics for your project' | ||
return badge({image, alt, url, title}) | ||
return badge({ image, alt, url, title }) | ||
} | ||
@@ -637,5 +724,5 @@ gabeacon.badgeCategory = 'social' | ||
*/ | ||
function googleplusone ({homepage}) { | ||
function googleplusone ({ homepage }) { | ||
// Check | ||
if ( !homepage ) throw new Error('homepage is missing') | ||
if (!homepage) throw new Error('homepage is missing') | ||
@@ -654,5 +741,5 @@ // Create | ||
*/ | ||
function redditsubmit ({homepage}) { | ||
function redditsubmit ({ homepage }) { | ||
// Check | ||
if ( !homepage ) throw new Error('homepage is missing') | ||
if (!homepage) throw new Error('homepage is missing') | ||
@@ -671,5 +758,5 @@ // Create | ||
*/ | ||
function hackernewssubmit ({homepage}) { | ||
function hackernewssubmit ({ homepage }) { | ||
// Check | ||
if ( !homepage ) throw new Error('homepage is missing') | ||
if (!homepage) throw new Error('homepage is missing') | ||
@@ -689,7 +776,7 @@ // Create | ||
*/ | ||
function facebooklike ({homepage, facebookApplicationID}) { | ||
function facebooklike ({ homepage, facebookApplicationID }) { | ||
// Prepare | ||
if ( !homepage ) throw new Error('homepage is missing') | ||
if (!homepage) throw new Error('homepage is missing') | ||
facebookApplicationID = facebookApplicationID || process.env.FACEBOOK_APPLICATION_ID | ||
if ( !facebookApplicationID ) throw new Error('facebookApplicationID is missing') | ||
if (!facebookApplicationID) throw new Error('facebookApplicationID is missing') | ||
@@ -709,7 +796,7 @@ // Return | ||
*/ | ||
function facebookfollow ({facebookUsername, facebookApplicationID}) { | ||
function facebookfollow ({ facebookUsername, facebookApplicationID }) { | ||
// Prepare | ||
if ( !facebookUsername ) throw new Error('facebookUsername is missing') | ||
if (!facebookUsername) throw new Error('facebookUsername is missing') | ||
facebookApplicationID = facebookApplicationID || process.env.FACEBOOK_APPLICATION_ID | ||
if ( !facebookApplicationID ) throw new Error('facebookApplicationID is missing') | ||
if (!facebookApplicationID) throw new Error('facebookApplicationID is missing') | ||
@@ -728,5 +815,5 @@ // Return | ||
*/ | ||
function twittertweet ({twitterUsername}) { | ||
function twittertweet ({ twitterUsername }) { | ||
// Prepare | ||
if ( !twitterUsername ) throw new Error('twitterUsername is missing') | ||
if (!twitterUsername) throw new Error('twitterUsername is missing') | ||
@@ -745,5 +832,5 @@ // Return | ||
*/ | ||
function twitterfollow ({twitterUsername}) { | ||
function twitterfollow ({ twitterUsername }) { | ||
// Prepare | ||
if ( !twitterUsername ) throw new Error('twitterUsername is missing') | ||
if (!twitterUsername) throw new Error('twitterUsername is missing') | ||
@@ -762,5 +849,5 @@ // Return | ||
*/ | ||
function githubfollow ({githubUsername}) { | ||
function githubfollow ({ githubUsername }) { | ||
// Prepare | ||
if ( !githubUsername ) throw new Error('githubUsername is missing') | ||
if (!githubUsername) throw new Error('githubUsername is missing') | ||
@@ -779,9 +866,9 @@ // Return | ||
*/ | ||
function githubstar ({githubSlug}) { | ||
function githubstar ({ githubSlug }) { | ||
// Prepare | ||
if ( !githubSlug ) throw new Error('githubSlug is missing') | ||
if (!githubSlug) throw new Error('githubSlug is missing') | ||
const split = githubSlug.split('/') | ||
const githubUsername = split[0] | ||
const githubRepository = split[1] | ||
if ( !githubUsername || !githubRepository ) throw new Error('githubSlug is invalid') | ||
if (!githubUsername || !githubRepository) throw new Error('githubSlug is invalid') | ||
@@ -802,5 +889,5 @@ // Return | ||
*/ | ||
function quorafollow ({quoraUsername, quoraRealname, quoraCode}) { | ||
function quorafollow ({ quoraUsername, quoraRealname, quoraCode }) { | ||
// Prepare | ||
if ( !quoraUsername ) throw new Error('quoraUsername is missing') | ||
if (!quoraUsername) throw new Error('quoraUsername is missing') | ||
quoraRealname = quoraRealname || quoraUsername.replace(/-/g, ' ') | ||
@@ -843,2 +930,6 @@ quoraCode = quoraCode || '7N31XJs' | ||
wishlist, | ||
buymeacoffee, | ||
liberapay, | ||
thanksapp, | ||
boostlab, | ||
slackinscript, | ||
@@ -845,0 +936,0 @@ slackin, |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
161594
13
3641
10
253
16
2
+ Addededitions@2.3.1(transitive)
+ Addederrlop@2.2.0(transitive)
+ Addedsemver@6.3.1(transitive)
- Removededitions@1.3.4(transitive)
Updatededitions@^2.0.2