segundo commit
This commit is contained in:
parent
6b8b75863a
commit
d2e79d63a5
13601 changed files with 1117197 additions and 0 deletions
32
node_modules/ssb-server/test/util.js
generated
vendored
Normal file
32
node_modules/ssb-server/test/util.js
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
var ref = require('ssb-ref')
|
||||
|
||||
exports.follow = function (id) {
|
||||
return {
|
||||
type: 'contact', contact: id, following: true
|
||||
}
|
||||
}
|
||||
exports.unfollow = function (id) {
|
||||
return {
|
||||
type: 'contact', contact: id, following: false
|
||||
}
|
||||
}
|
||||
exports.block = function unfollow(id) {
|
||||
return {
|
||||
type: 'contact', contact: id, flagged: true
|
||||
}
|
||||
}
|
||||
|
||||
exports.pub = function (address) {
|
||||
return {
|
||||
type: 'pub',
|
||||
address: ref.parseAddress(address)
|
||||
}
|
||||
}
|
||||
|
||||
exports.file = function (hash) {
|
||||
return {
|
||||
type: 'file',
|
||||
file: hash
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue