Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function get () {
debug('getting index message')
core.get(0, {valueEncoding: messages.Index}, async (err, index) => {
if (err) return cb()
if (index && index.type === 'hyperdrive') {
var contentKey = index.content.toString('hex')
debug('contentKey', contentKey)
return cb(contentKey)
}
debug('calling back')
return cb()
})
}
}