git ssb

7+

dinoworm ๐Ÿ› / patchcore



Tree: 377c8e80ded6586633d47e9bc446ee5317770603

Files: 377c8e80ded6586633d47e9bc446ee5317770603 / 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