git ssb

3+

dangerousbeans / scuttle-vue



Tree: b65df85068d01bbc7fd6b0ba8686cccbae6928ee

Files: b65df85068d01bbc7fd6b0ba8686cccbae6928ee / modules / avatar-name.js

337 bytesRaw
1var h = require('hyperscript')
2
3exports.needs = { signifier: 'first' }
4
5exports.gives = 'avatar_name'
6
7exports.create = function (api) {
8
9 return function name (id) {
10 var n = h('span', id.substring(0, 10))
11
12 api.signifier(id, function (_, names) {
13 if(names.length) n.textContent = names[0].name
14 })
15
16 return n
17 }
18}
19
20

Built with git-ssb-web