Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (isPrivate && unbox) {
data = db.unbox(data, unbox)
}
let result
if (isPrivate) {
result = data.value
} else {
result = u.originalValue(data.value)
}
cb(null, !meta ? result : {key: data.key, value: result, timestamp: data.timestamp})
})
} else if (ref.isMsgLink(key)) {
var link = ref.parseLink(key)
return db.get({
id: link.link,
private: true,
unbox: link.query.unbox.replace(/\s/g, '+'),
meta: link.query.meta
}, cb)
} else if (Number.isInteger(key)) {
_get(key, cb) // seq
} else {
throw new Error('ssb-db.get: key *must* be a ssb message id or a flume offset')
}
}
msgLink: function (v) {
if (!ref.isMsgLink(v))
return 'type'
},
feedId: function (v) {
msgLink: function (v) {
if (!ref.isMsgLink(v))
return 'type'
},
feedId: function (v) {