git ssb

1+

Daan Patchwork / patchwork



Tree: 1b789e63aa59f5d3e5539a4432c8b3c466977a0e

Files: 1b789e63aa59f5d3e5539a4432c8b3c466977a0e / lib / get-bump.js

385 bytesRaw
1const extend = require('xtend')
2
3module.exports = function (msg, bumpFilter) {
4 if (bumpFilter) {
5 let bump = typeof bumpFilter === 'function' ? bumpFilter(msg) : bumpFilter
6 if (bump) {
7 if (typeof bump === 'string') bump = { type: bump }
8 return extend({
9 id: msg.key,
10 author: msg.value.author
11 }, bump instanceof Object ? bump : {})
12 }
13 }
14}
15

Built with git-ssb-web