git ssb

1+

Daan Patchwork / patchwork



Tree: 25d8368d34ef870af9b9991d0ece5f0c5436e7e3

Files: 25d8368d34ef870af9b9991d0ece5f0c5436e7e3 / lib / get-timestamp.js

261 bytesRaw
1module.exports = function (msg) {
2 if (!msg || !msg.value || !msg.value.timestamp) return
3 if (msg.rts) {
4 return msg.rts
5 } else if (msg.timestamp) {
6 return Math.min(msg.timestamp, msg.value.timestamp)
7 } else {
8 return msg.value.timestamp
9 }
10}
11

Built with git-ssb-web