git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Tree: 6564ad1491e92cadd2cd0c9f59444b6f8c8cdaf2

Files: 6564ad1491e92cadd2cd0c9f59444b6f8c8cdaf2 / modules / profile / obs / names.js

427 bytesRaw
1var nest = require('depnest')
2var computed = require('mutant/computed')
3
4exports.needs = nest({
5 'about.obs.name': 'first'
6})
7
8exports.gives = nest({
9 'profile.obs': [ 'names' ]
10})
11
12exports.create = function (api) {
13 return nest({
14 'profile.obs': { names }
15 })
16
17 function names (ids) {
18 return computed(Array.from(ids).map(api.about.obs.name), join) || ''
19 }
20}
21
22function join (...args) {
23 return args.join('\n')
24}
25

Built with git-ssb-web