git ssb

4+

Dominic / scuttlebot



Tree: ed7e4997927bef14491b40767dbd64f58f2d246e

Files: ed7e4997927bef14491b40767dbd64f58f2d246e / test / util.js

532 bytesRaw
1var ref = require('ssb-ref')
2
3exports.follow = function (id) {
4 return {
5 type: 'contact', contact: id, following: true
6 }
7}
8exports.unfollow = function (id) {
9 return {
10 type: 'contact', contact: id, following: false
11 }
12}
13exports.block = function unfollow(id) {
14 return {
15 type: 'contact', contact: id, flagged: true
16 }
17}
18
19exports.pub = function (address) {
20 return {
21 type: 'pub',
22 address: ref.parseAddress(address)
23 }
24}
25
26exports.file = function (hash) {
27 return {
28 type: 'file',
29 file: hash
30 }
31}
32
33

Built with git-ssb-web