git ssb

7+

dinoworm ๐Ÿ› / patchcore



Tree: e7dda9470a027ac6e1e028d4732e10f03aee5d68

Files: e7dda9470a027ac6e1e028d4732e10f03aee5d68 / message / html / timestamp.js

425 bytesRaw
1const h = require('mutant/h')
2const nest = require('depnest')
3
4exports.gives = nest('message.html.timestamp')
5exports.needs = nest('lib.obs.timeAgo', 'first')
6
7exports.create = function (api) {
8 return nest('message.html.timestamp', timestamp)
9
10 function timestamp (msg) {
11 return h('a.Timestamp', {
12 href: msg.key,
13 title: new Date(msg.value.timestamp)
14 }, api.lib.obs.timeAgo(msg.value.timestamp))
15 }
16}
17
18

Built with git-ssb-web