git ssb

7+

dinoworm ๐Ÿ› / patchcore



Tree: 8787f12fef0041838b95781c8ab99865010468f5

Files: 8787f12fef0041838b95781c8ab99865010468f5 / 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