git ssb

7+

dinoworm ๐Ÿ› / patchcore



Tree: f84a9667fa03b5fc5f43b038c6e7616276a5907a

Files: f84a9667fa03b5fc5f43b038c6e7616276a5907a / channel / html / link.js

399 bytesRaw
1var h = require('mutant/h')
2var nest = require('depnest')
3
4exports.needs = nest({
5 'channel.sync.normalize': 'first'
6})
7
8exports.gives = nest('channel.html.link')
9
10exports.create = function (api) {
11 return nest('channel.html.link', function (channel, text = null) {
12 var ref = `#${api.channel.sync.normalize(channel)}`
13 return h('a ChannelLink', {href: ref, title: ref}, text || ref)
14 })
15}
16

Built with git-ssb-web